Advertisement
MRtecno98

Meteostation Program V.1.0.0

Dec 25th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | None | 0 0
  1. #include "DHT.h"
  2. #define DHTPIN 9
  3. #define DHTTYPE DHT11
  4.  
  5. DHT dht(DHTPIN, DHTType);
  6.  
  7. void setup() {
  8.   Serial.begin(9600);
  9.  
  10. }
  11.  
  12. void loop() {
  13.   int t = dht.readTemperature();
  14.   int h = dht.readHumidity();
  15.  
  16.   Serial.println("Temperature: " + t + " Humidity: " + h);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement