Skip to content

Commit

Permalink
Use setEnabled instead of setting the mode manually
Browse files Browse the repository at this point in the history
  • Loading branch information
sebromero committed Jun 14, 2024
1 parent d7852da commit ee02d07
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/OutdoorAirQuality/OutdoorAirQuality.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ee02d07

Please sign in to comment.