bencorrado / pmsensor

Library to read data from particulate matter sensors
MIT License
20 stars 15 forks source link

Add co2 checksum verification. #8

Closed joegross closed 5 years ago

joegross commented 6 years ago

A bad checksum should raise an exception but we stay consistent with the rest of the code and return None if the checksum fails.

Note: My just-plugged in MH-Z19B sensor will return, in order:

As this code doesn't know its history it's up to the calling function to keep track and potentially blacklist these values.