mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-29 08:27:17 +02:00
Fix: PMS Read Failed
This commit is contained in:
@ -457,6 +457,9 @@ void loop() {
|
||||
}
|
||||
|
||||
updateWiFiConnect();
|
||||
|
||||
/** Read PMS on loop */
|
||||
ag.pms5003.handle();
|
||||
}
|
||||
|
||||
static void sendPing() {
|
||||
@ -629,7 +632,7 @@ static void co2Update() {
|
||||
}
|
||||
|
||||
void pmUpdate() {
|
||||
if (ag.pms5003.readData()) {
|
||||
if (ag.pms5003.isFailed() == false) {
|
||||
pm25 = ag.pms5003.getPm25Ae();
|
||||
Serial.printf("PMS2.5: %d\r\n", pm25);
|
||||
pmFailCount = 0;
|
||||
|
Reference in New Issue
Block a user