Skip to content

Instantly share code, notes, and snippets.

@michaelsarduino
Created January 6, 2016 17:47
Show Gist options
  • Save michaelsarduino/ed03ff6256141512fda3 to your computer and use it in GitHub Desktop.
Save michaelsarduino/ed03ff6256141512fda3 to your computer and use it in GitHub Desktop.
#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