-
Notifications
You must be signed in to change notification settings - Fork 18
Description
- Arduino board: ESP32 Feather
- Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.13
When connecting to the particle sensor using the uart, the sensor will after about a minute fail continuously and not give any output. Removing this check allows the sensor to eventually resolve and continue functioning:
Adafruit_PM25AQI/Adafruit_PM25AQI.cpp
Lines 117 to 121 in ba3f10c
// Are there enough bytes to read from? | |
if (serial_dev->available() < bufLen) { | |
return false; | |
} | |
It looks like the sensor won't send any more data until the bogus bytes are read. After they are consumed the sensor will continue forward, fail the checksum and re-stabilize.
This PR would help prevent the issue: #10
Although, there may be other situations that could cause this deadlock to arise, like a noisy serial connection. I think both of these changes might be worth making, the consequence being some reads might fail the checksum, but as it is the reads fail continuously anyway.
Also in the forums it looks like these issues have been what these two people refer to, and sounds like it caused them to return their sensors:
https://forums.adafruit.com/viewtopic.php?t=200668&sid=ddf03cb5dfe45415ac3b76f599fcfa4e&start=15