Closed mansdahlstrom1 closed 3 years ago
Gotta look into that. It's been a while since I used the lib myself. But you're getting negative error codes?
Yes! Here is a snippet from the lib when installed from PIO
const char* DHT::getError() {
if (_status == 1) {
strcpy(_errorStr, "OK"); // NOLINT
} else if (_status == 0) {
strcpy(_errorStr, "BUSY"); // NOLINT
} else if (_status == -1) {
strcpy(_errorStr, "TO"); // NOLINT
} else if (_status == -2) {
strcpy(_errorStr, "NACK"); // NOLINT
} else if (_status == -3) {
strcpy(_errorStr, "DATA"); // NOLINT
} else if (_status == -4) {
strcpy(_errorStr, "CS"); // NOLINT
} else if (_status == -5) {
strcpy(_errorStr, "QTY"); // NOLINT
}
return _errorStr;
}
And this is my platformio.ini
[env:featheresp32]
platform = espressif32
board = featheresp32
framework = arduino
monitor_speed = 115200
lib_deps =
knolleary/PubSubClient@^2.8
bblanchon/ArduinoJson@^6.14.1
bertmelis/esp32DHT@^1.0.1
nkolban/ESP32 BLE Arduino@^1.0.1
I don't have access to my computer so it'll take a few days before I'm able to solve this.
Meanwhile, you can use the git version of this lib. Maybe I'll delete the GitHub tags all together. They were created when I didn't know about tags and releases and versioning yet.
I've removed all the tags and releases. Git version is the latest, so remove the version specification from your lib_deps. I'm not sure if you should do a pio lib update afterwards.
Thank you! I will get back to you once i've tested it
You might also take a look at #4
Hey! Everything is working well for me now with the DTH11 and a ESP32 Feather.
You might also take a look at #4
I was getting some inconsistent behaviour while using the the PlatformIO version of the lib, (random Error codes). But since updating to use the git repo as a dependency lib_dep=https://github.com/bertmelis/esp32DHT.git
instead it seems to be running smoothly. Havn't had it running for a long time yet be i'm using multiple sensors and they all seem to work without conflict.
Thanks again for the help!
EDIT: just looked through the output logs again I indeed got "UNDERFLOW" from the first reading as reported in #4
EDIT: just looked through the output logs again I indeed got "UNDERFLOW" from the first reading as reported in #4
I blame it on the ESP to setup some stuff when running for the first time and while doing that missing the first pulse. I mentioned it in the readme now.
Hey!
Been testing this library and I'm getting both -5 and -1 errors when trying to use this lib. I looked thought the code to try to find some more details regarding the error and why they occur. It would be great you could summarise what the error codes mean here in the README.md of this repo!
Also I'm using PlatformIO, and the package available from there is not the same as is in this repo. The code in the repo seems to be outdated?