2

Trying to get the DHT22 sensor working on my raspberry pi zero W. I have connected everything as required, I checked like 20 times but just in case here is a pic:

enter image description here

I used this links to figure out what to connect and where https://www.pubnub.com/blog/2015-07-09-raspberry-pi-humidity-temperature-sensor-dashboard-dht-22-sensor/ https://pinout.xyz/pinout/io_pi_zero

I have tried to use the Adafruit_Python_DHT library and i just always get None, None for both sensors even if looping several times.

I then decided to give DHTXXD a try and still nothing I get repeatedly 3 0.0 0.0

Now I wonder what else I can try? I also tried using GPIO 17 and nothing, I tried using 5V also but same results. How can I test if even the sensor is detected? Nor adafruit library nor DHTXXD give any crashes errors. TIA

Update1: after trying @Jamie JaysCom answer and it does not work for me. I think now maybe my sensor was damaged due to my first wiring attempts(not sure) so will try getting another one. Also wondering if the breadboard could be damaged? How about the resistor? Rpi is the only thing that seems to work well: I have tested with http://wiringpi.com/the-gpio-utility/pin-test/ and got OK for all the pins.

vallllll
  • 121
  • 1
  • 1
  • 5

3 Answers3

1

Ive not used a zero yet (although i do have several zero W's that im playing with, using DS18b20 temperature sensors) http://www.home-automation-community.com/temperature-and-humidity-from-am2302-dht22-sensor-displayed-as-chart/

ive written out my own Procedures for this stuff, as a lot of web pages TRY to help, but dont always include all the "nitty bitty" stuff you have to do if just one step fails, or isnt there, or spelled wrong.

sudo apt update

To enable the protocol, run shell command

sudo raspi-config

Then select Advance Options and enable I2C and SPI You need to reboot to effect the configuration.

Have this installed too:

sudo apt-get install build-essential python-dev python-openssl

VCC is 3.3v Use the AdaFruit library.....google that puppy (git hub download)

We’re using DHT22 and connected to the GPIO PIN 4, so, our command line will be

sudo ./AdafruitDHT.py 22 4

Let us know if that helps!

JRR
  • 11
  • 2
0

Fixed it by removing the following part from the project: parts removed

and connected the jump cables directly to the raspberry pi. Wonder why that is, maybe these parts only work if soldered? I managed to solve the issue by trying outjust a simple led project which helped me to realize which part was not working: https://thepihut.com/blogs/raspberry-pi-tutorials/27968772-turning-on-an-led-with-your-raspberry-pis-gpio-pins

vallllll
  • 121
  • 1
  • 1
  • 5
-1

The only pins I know of that dont have to be saudered require a jig and are tapped in are available here: https://is.gd/u6Goftenter image description here

Chris
  • 1