Skip to content

Instantly share code, notes, and snippets.

@maipatana
Last active September 5, 2019 04:20
Show Gist options
  • Save maipatana/7503a5da0560d428beb4686f40d882b8 to your computer and use it in GitHub Desktop.
Save maipatana/7503a5da0560d428beb4686f40d882b8 to your computer and use it in GitHub Desktop.
#include <dht.h>
dht DHT;
#define DHT11_PIN 7
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);
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment