I have a DHT-22 with a Nano. I have a Buck- 12v to 5v rated to 3A providing power to the Nano-Vin and the DHT. I have the pull up resistor. I have a 12vdc-1A wall wart to the Buck.
If I plug in only the USB cable I get correct readings from the DHT.
If I plug in the 12v with the USB and press reset, I get correct readings from the DHT.
If I un-plug the USB laving just the 12v and press reset, I get the correct readings from the DHT.
If I un-plug the 12v and replug it in I get invalid readings from the DHT.
With the 12v plugged in and invalid readings, I plug in the USB and it reboots itself and I get the correct readings from the DHT.
I have tried two other Nanos same thing. It seems like there is something being set by plugging in the USB.
Could it be something with the Data Pin? The example program just shows
SalineSolution:
I have a DHT-22 with a Nano. I have a Buck- 12v to 5v rated to 3A providing power to the Nano-Vin and the DHT. I have the pull up resistor. I have a 12vdc-1A wall wart to the Buck.
Connect the buck converter to the 5V pin, not to Vin :