Ruby code to read data from an SDS011 particulate matter sensor
This assumes Ruby is installed.
git clone git@github.com:nerdinand/sds011-ruby.git && cd sds011-ruby
bundle install
ruby sds011.rb
Note: You probably have to adapt the serial port on which your sensor is connected (see sds101.rb
).
Tested on macOS Mojave 10.14.4, but should work on Linux too. No clue about Windows... ;-)
Licensed under MIT license: https://opensource.org/licenses/MIT