lewapek / sds-dust-sensors-arduino-library

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

Examples have reversed arguments #26

Closed lenaxia closed 3 years ago

lenaxia commented 4 years ago

Exmaples have sds(rxPin, txPin), however this results in an error. I had to set it as sds(txPin, rxPin) for mine to work.

lewapek commented 3 years ago

Hi, you probably need to switch rx and tx connections on the board. The library just passes rx and tx (in that order) to SoftwareSerial constructor: https://github.com/lewapek/sds-dust-sensors-arduino-library/blob/master/src/Serials.h#L56