You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use this code on an LED controller board I created. I noticed I was seeing data corruption on the LED data line due to some timing issues. I managed to track it down to this code. The delay's can cause problems with timing sensitive code (ie: WLED). I may try to rewrite it without the delays but I may not have the time for a bit.
// 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);
}
The text was updated successfully, but these errors were encountered:
I use this code on an LED controller board I created. I noticed I was seeing data corruption on the LED data line due to some timing issues. I managed to track it down to this code. The delay's can cause problems with timing sensitive code (ie: WLED). I may try to rewrite it without the delays but I may not have the time for a bit.
The text was updated successfully, but these errors were encountered: