Created
April 18, 2019 10:18
-
-
Save Isaac-the-Man/b54e32b5ee0570bfc0cdc0f73c5908ea 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 <dht.h> // essential library for DHT11 | |
#define DHT11_PIN 7 | |
dht DHT; | |
void setup(){ | |
Serial.begin(9600); | |
} | |
void loop() | |
{ | |
int chk = DHT.read11(DHT11_PIN); | |
Serial.print("Temperature = "); | |
Serial.println(DHT.temperature); | |
Serial.print("Humidity = "); | |
Serial.println(DHT.humidity); | |
Serial.println(""); | |
delay(2000); // delay should be at least 2 sec | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment