Browse Source

query sds only once

ir
Hendrik Langer 5 years ago
parent
commit
e576438817
  1. 6
      src/main.cpp

6
src/main.cpp

@ -125,7 +125,7 @@ void printValues() {
Serial.print("Raw UVA reading: "); Serial.println(uv.readUVA()); Serial.print("Raw UVA reading: "); Serial.println(uv.readUVA());
Serial.print("Raw UVB reading: "); Serial.println(uv.readUVB()); Serial.print("Raw UVB reading: "); Serial.println(uv.readUVB());
} }
/*
if (sds_active) { if (sds_active) {
PmResult pm = sds.readPm(); PmResult pm = sds.readPm();
if (pm.isOk()) { if (pm.isOk()) {
@ -141,7 +141,7 @@ void printValues() {
Serial.println(pm.statusToString()); Serial.println(pm.statusToString());
} }
} }
*/
} }
void sendValues() { void sendValues() {
@ -237,7 +237,7 @@ void setup()
if (sds_fw.isOk()) { if (sds_fw.isOk()) {
sds_active = true; sds_active = true;
sds.setActiveReportingMode(); // ensures sensor is in 'active' reporting mode sds.setActiveReportingMode(); // ensures sensor is in 'active' reporting mode
// sds.setCustomWorkingPeriod(5); // sensor sends data every 3 minutes sds.setCustomWorkingPeriod(5); // sensor sends data every 3 minutes
} else { } else {
Serial.println("Failed to communicate with SDS011 sensor, check wiring?"); Serial.println("Failed to communicate with SDS011 sensor, check wiring?");
} }

Loading…
Cancel
Save