pycom / pycom-micropython-sigfox

A fork of MicroPython with the ESP32 port customized to run on Pycom's IoT multi-network modules.
MIT License
200 stars 166 forks source link

Clock stretching 10ms too short for SCD30 CO2 sensor #462

Open tiborrr opened 4 years ago

tiborrr commented 4 years ago

10ms clock stretching is not sufficient for the SCD30 CO2 sensor

Sensirion tells us the following: Clock stretching period in write- and read-frames is 30ms, however, due to internal calibration processes a maximal clock stretching of 150 ms may occur once per day.

Fix: increase the clock stretching capabilities to 150ms

https://github.com/pycom/pycom-micropython-sigfox/blob/a159dee1ed09c9ab444183da1873c08120db6f1b/esp32/mods/machine_i2c.c#L120