Sensirion / embedded-sps

Embedded i2c Driver for Sensirion Particulate Matter Sensors - Download the Zip Package from the Release Page
https://github.com/Sensirion/embedded-sps/releases
BSD 3-Clause "New" or "Revised" License
45 stars 15 forks source link

Add delay to fix possible I2C write fail #31

Closed GetPastTheMonkey closed 4 years ago

GetPastTheMonkey commented 4 years ago

For the following commands, an I2C write fail might occur when the sensor is still processing the command and a new command is sent:

A delay of 10ms is added to these commands (15ms for sps30_set_fan_auto_cleaning_interval and sps30_set_fan_auto_cleaning_interval_days, 50ms for sps30_reset) to give the sensor enough time to process these commands