ricki-z / SDS011

Arduino library for SDS011 dust sensor
GNU General Public License v3.0
81 stars 53 forks source link

Does this work for SDS018? #4

Closed marcuscbehrens closed 7 years ago

marcuscbehrens commented 7 years ago

I did not try it but the sleep and wakeup portion of this also works with the SDS018. I guess the other piece will just work as well. I'm not using this library but the example at https://github.com/crystaldust/sds018 and have re-used the sleep and wake code from your library in combination with it. Also rather using Hardware Serial1 instead of SoftSerial (had bad experience in the past).

ricki-z commented 7 years ago

The control protocol is the same for SDS011, SDS018 and SDS021. But I couldn't test it with with another sensor than the SDS011. We use the code in a project based on esp8266 so we needed to use the SoftSerial. But yes, you can also use the hardware serial.