Likewise, it is fairly easy to connect up to the DHT sensors. They have four pins
- VCC - red wire Connect to 3.3 - 5V power. Sometime 3.3V power isn't enough in which case try 5V power.
-
Data out - white or yellow wire
- Not connected
-
Ground - black wire
Simply ignore pin 3, it's not used. You will want to place a 10 Kohm resistor between VCC and the data pin, to act as a medium-strength pull up on the data line. The Arduino has built in pullups you can turn on but they're very weak, about 20-50K
This diagram shows how we will connect for the testing sketch. Connect data to pin 2, you can change it later to any pin.
If you have an AM2302
Text editor powered by tinymce.