Skip to content

chocotov1/SDS011Reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SDS011Reader

Arduino library that reads data of SDS011 particle sensor. Sending commands to SDS011 is not implemented. Tested with UNO.

To use this library the Serial object must first be initialized in the sketch:

Serial.begin(9600);

Functions

  • read_data(): Reads the next reading.
  • get_avg_reading(number_of_readings): Reads number_of_readings and calculates average value.
  • pm10(), pm25()
  • pm10_avg(), pm25_avg()

Features

  • serial buffer is cleared before reading data (serial buffer can theoretically hold multiple unread readings)
  • blocking reading with timeout of 1200 ms
  • get_avg_reading() returns after 2 failed readings

Demo sketch

The demo sketch demonstrates 4 normal readings with read_data() followed by a average reading with get_avg_reading().

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages