From ee02d07a9081a4210ac2e62cbfda23762cb0d15b Mon Sep 17 00:00:00 2001 From: Sebastian Romero Date: Fri, 14 Jun 2024 11:01:27 +0200 Subject: [PATCH] Use setEnabled instead of setting the mode manually --- examples/OutdoorAirQuality/OutdoorAirQuality.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/OutdoorAirQuality/OutdoorAirQuality.ino b/examples/OutdoorAirQuality/OutdoorAirQuality.ino index 49412df..7083a5a 100644 --- a/examples/OutdoorAirQuality/OutdoorAirQuality.ino +++ b/examples/OutdoorAirQuality/OutdoorAirQuality.ino @@ -40,7 +40,8 @@ void setup() { // Enable outdoor air quality sensor (disabled by default) // Please note that it may take some time for the sensor to deliver the first data - outdoorAirQualitySensor.setMode(OutdoorAirQualitySensorMode::outdoorAirQuality); + // Use setEnabled(true, true) make the change persistent + outdoorAirQualitySensor.setEnabled(true); displaySensorData(outdoorAirQualitySensor); // Optionally disable the sensor