Closed limecat-ss closed 2 years ago
What is the IDE example code & library?
Did you set DHT_TYPE
to DHT_CHIP_DHT11
?
I used the example library for dht11 in the arduino IDE.
My configuration in platformio.ini is:
build_src_flags =
-DWEMOS_D1_MINI -DNOWSAUTH
-DHT_SUPPORT=1 -DHT_PIN=14 -DHT_TYPE=DHT_CHIP_DHT11
1.15.0-dev
How did you get the source? Did you just get dev branch .zip?
Does it work if these lines are removed? https://github.com/xoseperez/espurna/blob/1169be25a55401d42e3b3a465dbb1dc9f8c2f1df/code/espurna/gpio.cpp#L843-L899
(edit: sry, old .h would not work)
...although, looking at the .h I mentioned, what about this change?
(open code/espurna/system.cpp and find the corresponding void blockingDelay
func, and change false
to true
)
diff --git a/code/espurna/system.cpp b/code/espurna/system.cpp
index 067e37d5..8080ad34 100644
--- a/code/espurna/system.cpp
+++ b/code/espurna/system.cpp
@@ -315,7 +315,7 @@ bool tryDelay(CoreClock::time_point start, CoreClock::duration timeout, CoreCloc
void blockingDelay(CoreClock::duration timeout, CoreClock::duration interval) {
blockingDelay(timeout, interval, []() {
- return false;
+ return true;
});
}
Does not seem it waits for DHT properly
It works ! Changing false to true makes me get Temperature and Humidity correctly. Thanks !
Device
Wemos d1 Mini
Version
1.15.0-dev
Bug description
Hi,
I can't make dht11 work with the module. I always get timeout. It doesn't seem to be a hardware problem because with the Arduino IDE it works perfectly.
The module model is KY-015, and it comes with a 10k ohm pull-up resistor
Steps to reproduce
No response
Build tools used
PlatformIO
Any relevant log output (when available)
Decoded stack trace (when available)
No response