From 13eb1416bab89a9923cd880a9a0e626f17ae95fc Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Tue, 17 Sep 2024 10:10:46 +0800 Subject: [PATCH] PMSA0031 sensors require ~3secs before coming up on I2C As reported by @MALAONE1 and debugged by @shodan8192 , PMSA0031s on a RAK4631 take 3 seconds before they can become detectable on I2c. Add a delay(4000) before I2C scan if the air quality sensor pin is defined. Fixes https://github.com/meshtastic/firmware/issues/3690 --- src/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.cpp b/src/main.cpp index 2c8c0dcb83..0de25538fe 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -393,6 +393,7 @@ void setup() // RAK-12039 set pin for Air quality sensor pinMode(AQ_SET_PIN, OUTPUT); digitalWrite(AQ_SET_PIN, HIGH); + delay(4000); // Detectable on I2C after ~3 seconds. #endif #ifdef T_DECK