ostapdontstop

Temper

Jul 24th, 2018
166
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stDHT.h>
  2.  
  3. DHT sens (DHT11); //
  4.  
  5. void setup() {
  6. Serial.begin(57600);
  7. pinMode(9, INPUT);
  8. digitalWrite(9, HIGH);
  9.  
  10. }
  11.  
  12. void loop() {
  13. int t = sens.readTemperature(9);
  14. int h = sens.readHumidity(9);
  15. delay(2000);
  16.  
  17. Serial.print("Hum: ");
  18. Serial.print(h);
  19. Serial.print("% ");
  20. Serial.print("Temp: ");
  21. Serial.print(t);
  22. Serial.print(" C ");
  23. }
RAW Paste Data