From 9d2996bd8223bafd19b08001f58fc1bef0faec31 Mon Sep 17 00:00:00 2001 From: "tyeth.gundry@magvision.tech" Date: Tue, 13 Dec 2022 16:12:57 +0000 Subject: [PATCH] fix: improve reliability of first reading --- src/components/i2c/drivers/WipperSnapper_I2C_Driver_SEN5X.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SEN5X.h b/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SEN5X.h index 1e1dd1862..9908bae0c 100644 --- a/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SEN5X.h +++ b/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SEN5X.h @@ -59,6 +59,7 @@ class WipperSnapper_I2C_Driver_SEN5X : public WipperSnapper_I2C_Driver { if (error_stop != 0) { return false; } + delay(1100); // Wait 1 second for sensors to start recording + 100ms for reset u_int16_t error_start = _sen->startMeasurement(); if (error_start != 0) { return false;