lewapek / sds-dust-sensors-arduino-library

Library for Nova Fitness SDS dust sensors family (SDS011, SDS021)
MIT License
64 stars 19 forks source link

Query reporting mode #20

Closed tonytony00 closed 4 years ago

tonytony00 commented 4 years ago

Hello, If I don't use a serial monitor can I set the Query reporting mode without the command "Serial.println" present in the file in the examples folder? : Serial.println(sds.setQueryReportingMode().toString()); ?

I would to set the SDS011 sensor in query reporting mode, wakeup the sensor, read the PM value and sleep the sensor.

Can I use this command?

ReportingModeResult result = sds.setQueryReportingMode(); or exist a command without result?

sds.wakeup(); (like file in the example folder)

PmResult result = sds.queryPm();

WorkingStateResult result = sds.sleep(); or exist a command without result like sds.wakeup();?

In a first test, if I use the serial monitor, initially I read strange values in the serial monitor. Thanks.

lewapek commented 4 years ago

sds.setQueryReportingMode() and sds.sleep() commands mutate internal state of the sensor. You can use values returned by those commands as well as ignore them.