#include <DHT.h>
#define Type DHT11
int sensePn = 2;
DHT HT(sensePn, Type);
float humidity;
float tempC;
float tempF;
int dt 500;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
HT.begin();
delay(dt); //This is if you're using an unfimiliar library. It gives to to make sure everything is set up.
}
void loop() {
// put your main code here, to run repeatedly:
humidity = HT.readHumidity();
tempC = HT.readTemperature();
tempF = HT.readTemperature(true);
Serial.print("Humidity: " + humidity);
Serial.println("hey")
}
@llamabro4, your topic has been moved to a more suitable location on the forum.
Please take some time to read How to get the best out of this forum and next apply what you've learned / read about code tags to the code in your post.
It's not a standard library. So you have to download it. And most (or maybe all) Adafruit libraries rely on other Adafruit libraries (it's a bit of a pain); this assumes that the DHT library is an Adafruit library.