Basic Connections

Connect GND on the module to GND on your Arduino; VIN on the module to the power pin (5V or 3.3V, see above) on your Arduino; and DATA on the module to one of the digital I/O pins. In this example we've used 5V for VIN and D2 for DATA.

Reading Values

Communicating with the Humidity / Temperature Sensor Module requires a driver for the DHT22 sensor. The simplest way to install the driver is to download the DHT library from the Freetronics repository on GitHub and install it in your Arduino IDE. Visit the following repository in your browser, and look for the "Download ZIP" button to download it as a ZIP archive:

Uncompress the archive and rename the folder to "DHT", then move it into your sketchbook/libraries/ folder. See How to Install Arduino Libraries for a complete guide.

Once the library is installed in the IDE, you will find a new example under File -> Examples -> DHT -> DHTtester. Open that example in the Arduino IDE, compile it, and upload it to your Arduino. Open the serial console in the IDE and set it to 9600bps to match the setting in the example sketch.