Hi everyone,
I am working on a project using an Arduino Nano and a DHT11 temperature and humidity sensor but I am struggling to get consistent readings. I am using the Adafruit DHT library and while the sensor sometimes works fine.., other times it just gives “nan” or zero values.
Here’s what I’ve checked so far :-
Wiring :- Everything looks good – VCC to 5V, GND to GND, and DATA to pin D2 with a 10k pull-up resistor.
Code :- I am using the basic example from the library with the correct pin and sensor type defined.
Power :- The Nano is powered via USB and I have tried multiple cables.
Has anyone else faced similar issues: ?? Could it be a faulty sensor or am I missing something obvious: ?? Would a capacitor across the sensor’s power lines help: ??
Any suggestions or debugging tips would be greatly appreciated. Thanks in advance !!