Advertisement
Guest User

Untitled

a guest
Jul 20th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <dht.h>
  2.  
  3. dht DHT;
  4.  
  5. #define DHT11_PIN 2
  6. void setup(){
  7.  
  8. Serial.begin(9600);
  9. }
  10. void loop(){
  11. int chk = DHT.read11(DHT11_PIN);
  12. Serial.print("Temperature = ");
  13. Serial.println(DHT.temperature);
  14. Serial.print("Humidity = ");
  15. Serial.println(DHT.humidity);
  16. delay(1000);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement