Created
January 6, 2016 17:47
-
-
Save michaelsarduino/ed03ff6256141512fda3 to your computer and use it in GitHub Desktop.
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
#include <dht11.h> | |
dht11 DHT11; | |
#define DHT11PIN 2 | |
void setup() | |
{ | |
Serial.begin(115200); | |
} | |
void loop() | |
{ | |
DHT11.read(DHT11PIN); | |
float temp = DHT11.temperature - 1.0; | |
Serial.println(temp); | |
delay(2000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment