Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <dht11.h>
- dht11 DHT11;
- #define DHT11PIN 54
- void setup()
- {
- Serial.begin(9600);
- Serial.println("DHT11 TEST PROGRAM ");
- Serial.print("LIBRARY VERSION: ");
- Serial.println(DHT11LIB_VERSION);
- Serial.println();
- }
- void loop()
- {
- int chk = DHT11.read(DHT11PIN);
- Serial.print("Humidity (%): ");
- Serial.println((float)DHT11.humidity, 2);
- Serial.print("Temperature (oC): ");
- Serial.println((float)DHT11.temperature, 2);
- delay(2000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement