Skip to content
/ SDS011 Public
forked from REVOtic/SDS011

Arduino library for SDS011 dust sensor

License

Notifications You must be signed in to change notification settings

tikh-iv/SDS011

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDS011

Arduino library for dust Sensor SDS011 (Nova Fitness Co.,Ltd)
This library uses SoftSerial or HardwareSerial to connect to the SDS011.

Usage

  • Define SDS object: i.e. SDS011 mySDS;

  • Start object: void begin(pinRX,pinTX); i.e. mySDS.begin(pinRX,pinTX);

  • Read values: int read(float *p25, float *p10); i.e. error = mySDS(&pm25,&pm10);

Reads the PM2.5 and PM10 values, return code is 0, if new values were read, and 1 if there were no new values.

  • Sleep Mode: mySDS.sleep();

  • Wakeup Mode: mySDS.wakeup();

During sleep mode, the fan & Laser stops working and the current draw is < 4 mA. The minimal run time of this sensor is 30 seconds.

Alternative with HardwareSerial

  • SDS object can also be initialized with a Serial object as parameter
    i.e.
SDS011 mySDS;
mySDS.begin(Serial1);

HardwareSerial objects need to be defined if using ESP32

About

Arduino library for SDS011 dust sensor

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 100.0%