Created
September 15, 2018 11:48
-
-
Save xxlukas42/cdf47658928135eb7af9ace75336e451 to your computer and use it in GitHub Desktop.
DHT12 shield for D1 mini Pro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Install https://github.com/wemos/WEMOS_DHT12_Arduino_Library first | |
#include <WEMOS_DHT12.h> | |
DHT12 dht12; | |
void setup() { | |
Serial.begin(115200); | |
} | |
void loop() { | |
if(dht12.get()==0){ | |
Serial.print("Temperature in Celsius : "); | |
Serial.println(dht12.cTemp); | |
Serial.print("Temperature in Fahrenheit : "); | |
Serial.println(dht12.fTemp); | |
Serial.print("Relative Humidity : "); | |
Serial.println(dht12.humidity); | |
Serial.println(); | |
} | |
delay(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment