two_socks
Posts: 6
Joined: Thu Aug 15, 2019 8:49 pm

DHT11 faulty reading or normal behaviour

Thu Aug 15, 2019 9:34 pm

I have a DHT11 Humidity & Temperature Sensor.
I know it's an entry level sensor and not very precise but using a couple of python examples (they interact directly with the sensor, without using any library) the reading sometimes come back with error or timeout.
I tried to check the "official" adafruit library too but it looks like a .c file installed to O.S. level.

Maybe because the synchronization (defined in the protocol) is not so precise, it's very easy to mess up with the data.
What's your experience with this sensor?
Is this a normal behavior or do I have a faulty sensor?

Thanks

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

Re: DHT11 faulty reading or normal behaviour

Thu Aug 15, 2019 9:44 pm

I suggest you try my C example.

http://abyz.me.uk/rpi/pigpio/examples.html#pdif2_DHTXXD

The software requires the pigpio daemon to be running.

sudo pigpiod

If it doesn't work your sensor is either wired up wrong or faulty.

Return to “Automation, sensing and robotics”