i wanna ask some expert in here, i was using 3.3v as the vcc for dht22 module (3 pin), it worked normally but one time it can't read any data (nan), i changed my gpio, checked the wire, but it still can't read the data.
so, i tried to connect the vcc with 5v and it instantly works again (i just re-open the serial monitor without change any code, only change the wire connection), so i thought "well, i must use 5v instead of 3.3v, but, when i re-upload the code (literally same code), it become nan again (with 5 v) after works several time.
then i tried the previous work (use 3.3v --> it works), then change it again to 5v --> it also works), so i guess the vcc isn't the issue for the can't read the data like was I thought before. can anybody please explain what's the possible reason it became nan? i want to know cause it's gonna be hard if already attach dht22 in pcb and out of nowhere it display nan right..
