linderman
Posts: 14
Joined: Thu Dec 03, 2015 4:08 pm

Problem with GPIO 4 after Adafruit DHT install

Sat Dec 12, 2015 8:55 pm

Hello guys/gals

I did successfully installed Adafruit_Python_DHT from here: https://github.com/adafruit/Adafruit_Python_DHT

sudo python setup.py install.

The DH11 sensor works great - no problems with it. But then i disconnected it and connected a LED on same pin 4. Plugged in the RPi and it just start to emmit light ... then stop .... then back on and so on ... LED turn on and off by it self at random rate. Also in command line , when i write

Code: Select all

$gpio -g mode 4 out
$gpio -g write 1
nothing happend, LED continue to ON/OFF by itself. Also gpio -g write 4 0 -> didnt stop the LED from turning on by its self.

I want to note that: just yesterday this LED was on pin 4 and everything was OK , using same terminal commands and same electronic components. And the only difference is that today i installed Adafruit_Python_DH and connected the DH11 sensor.

Can you suggest , why such behavior now?

Thanks

User avatar
joan
Posts: 14470
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Problem with GPIO 4 after Adafruit DHT install

Sat Dec 12, 2015 9:19 pm

Pin 4 is 5V. You probably mean GPIO 4 on pin 7.

If so then something is using GPIO 4.

The most likely candidate is the Adafruit DHT code. How did you run the Adafruit code?

The next most likely is 1-wire code.

linderman
Posts: 14
Joined: Thu Dec 03, 2015 4:08 pm

Re: Problem with GPIO 4 after Adafruit DHT install

Sat Dec 12, 2015 9:27 pm

joan wrote:Pin 4 is 5V. You probably mean GPIO 4 on pin 7.

If so then something is using GPIO 4.

The most likely candidate is the Adafruit DHT code. How did you run the Adafruit code?

The next most likely is 1-wire code.
Yes, i am using GPIO4 at pin 7.

Usually i am running the Adafruit code:

Code: Select all

sudo ./AdafruitDHT.py 11 4
The code inside this file is from their examples: https://github.com/adafruit/Adafruit_Py ... ruitDHT.py

But the problem with self behaving LED occurs even when i didnt started the Adafruit code at all. I just restarted RPi after installing Adafruit DH and when the system booted - LED started to ON/OFF/ON/OFF by it self. No straight pattern like - lid every second or so ...
The next most likely is 1-wire code.
Can you explain, please?

User avatar
joan
Posts: 14470
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Problem with GPIO 4 after Adafruit DHT install

Sat Dec 12, 2015 9:40 pm

There is a bus system called 1-wire which typically uses GPIO 4 on the Pi. That may be active.

What is reported by the following command?

grep dtparam /boot/config.txt

linderman
Posts: 14
Joined: Thu Dec 03, 2015 4:08 pm

Re: Problem with GPIO 4 after Adafruit DHT install

Sat Dec 12, 2015 11:22 pm

#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on
dtparam=audio=on
this is the exact output.

Return to “Troubleshooting”