diff --git a/src/main.cpp b/src/main.cpp index f7e9832..0307a77 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -232,7 +232,15 @@ void setup() } sds.begin(); - sds_active = true; // ToDo + + FirmwareVersionResult sds_fw = sds.queryFirmwareVersion(); + if (sds_fw.isOk()) { + sds_active = true; + sds.setActiveReportingMode(); // ensures sensor is in 'active' reporting mode + sds.setCustomWorkingPeriod(5); // sensor sends data every 3 minutes + } else { + Serial.println("Failed to communicate with SDS011 sensor, check wiring?"); + } display.clearScreen(); display.refresh();