DHT22 Sensor Not Reading

Discussion in 'General Discussion' started by Tom Thumb, Apr 15, 2017.

  1. Tom Thumb

    Tom Thumb New Member

    Joined:
    Apr 15, 2017
    Messages:
    2
    Likes Received:
    0
    Configuration:
    UDOO Quad
    Udoo version: udoobuntu-udoo-qdl-desktop_2.1.2
    Arduino IDE 1.8.2 compiling from Windows 7 Desktop
    DHT22 connected to 3.3v power

    So I've seen a few other DHT22 threads but was unable to find anything to steer me in the correct direction. People have suggested issues with certain libraries and have no pointed in the direction of working libraries from what I have seen. So here's my situation:

    I have a DHT22 purchased from Adafruit with the resistor built in as seen here: https://www.adafruit.com/product/393

    This sensor is connect to pin D23 on the UDOO quad pinout diagram or GPIO124.

    I am using the official Adafruit library version 1.3 with the Adafruit_sensor.h

    For the sketch, I am using the sample sketch provided with the libraries and changing the #define DHTPIN to "23".

    Now in the past I have had trouble with some temperature sensors (DS18B20 v2.0) reading until I had added the pinmode and HIGH or LOW. Does the DHT22 require this and it's just not included in the sample sketch? Is there anything other than changing the pin that this sketch is pointing to that might be left out of the instructions that are particular to the UDOO quad? Any help will be greatly appreciated.
     
  2. waltervl

    waltervl Well-Known Member

    Joined:
    Dec 12, 2015
    Messages:
    988
    Likes Received:
    299
  3. Tom Thumb

    Tom Thumb New Member

    Joined:
    Apr 15, 2017
    Messages:
    2
    Likes Received:
    0
    Thanks for pointing me to that Library. I got it set up and I'm still receiving a time out error. I've checked to make sure that I'm getting proper voltage and have connected the sensor wires directly to the jumper wires coming out of the udoo and the power board I'm using and still receiving time outs.

    Do I need to specify the pinmode on these? Is there anything missing from the example sketch that I should be aware of?
    Is it correct to define the pin as "23" for the pin that's noted as "D23" or "GPIO124" on the pinout diagram?

    Code:
    #define DHT22_PIN 23
     
  4. waltervl

    waltervl Well-Known Member

    Joined:
    Dec 12, 2015
    Messages:
    988
    Likes Received:
    299

Share This Page