Closed arcayi closed 4 years ago
Thanks for the contribution! Just a question on the renamed nm_timer_mode
. Is it because is conflicting with a timer_mode defined by some specific board right?
Yes. It happened when I setup stm32f103c8t6 bluepill borad using board definition as the link http://dan.drown.org/stm32duino/package_STM32duino_index.json. That board definition may be based on maple platform definition, where timer_mode had been defined.
Thanks, just merged
Hello,
I think this edit of SensorDHT.h is not correct.
You commented out line this line: //_dht->readSensor(true);
in onLoop() routine.
Without this command sleeping node will not read values correctly, because millis() doesn't increase during sleeping, so the condition in DHT library (DHT.cpp)
unsigned long startTime = millis();
if ( !force && (unsigned long)(startTime - lastReadTime) < (model == DHT11 ? 999L : 1999L) ) {
return;
}
lastReadTime = startTime;
will not be met a lot of times! For example, if node is sleeping 5minutes, and execution of code is 500ms, only every 4th measuremenet will be valid (4x500ms > 2000L for DHT22)
I had to uncomment this line, to make my sensor work correctly.
Peter.
Thanks! Just opened #527 for this
fix some compile errors.