DHT dht(DHTPIN, DHTTYPE, 15);
A value of 11 worked for me, but https://github.com/esp8266/arduino suggests using 15.
Good luck!
Explore... Chat... Share...
DHT dht(DHTPIN, DHTTYPE, 15);
unsigned long startTime = millis();
if ( (unsigned long)(startTime - lastReadTime) < (model == DHT11 ? 999L : 1999L) ) {
return;
}
lastReadTime = startTime;
temperature = NAN;
humidity = NAN;
// Request sample
digitalWrite(pin, LOW); // Send start signal
pinMode(pin, OUTPUT);
if ( model == DHT11 ) {
delay(18);
}
else {
// This will fail for a DHT11 - that's how we can detect such a device
delayMicroseconds(800);
}
burkmurray wrote:I had to add a timing value to the DHT initialization to adjust for the faster processor on the ESP12 vs Uno:Code: Select allDHT dht(DHTPIN, DHTTYPE, 15);
A value of 11 worked for me, but https://github.com/esp8266/arduino suggests using 15.
Good luck!
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]