Arduino library for the DHT22 temperature and humidity sensor
For a simple, easy installation download the repository as a zip file and follow the instructions on how to install an Arduino library from a zip file.
The example below is also in the examples
folder.
#include <DHTino.h>
DHTino dht(4);
void setup()
{
Serial.begin(9600);
while (!Serial)
{
}
Serial.println("Setup is done");
}
void loop()
{
delay(2000);
struct DHTinfo info = dht.getInfo();
Serial.print("Humidity: ");
Serial.println(info.humid);
Serial.print("Temperature: ");
Serial.println(info.temp);
}