Ribbit-Network / ribbit-network-frog-hardware

The sensor for the world's largest crowdsourced network of open-source, low-cost, GHG Gas Detection Sensors.
https://www.ribbitnetwork.org/
MIT License
94 stars 26 forks source link

Enable i2c-gpio on rasbperry pi #83

Closed keenanjohnson closed 2 years ago

keenanjohnson commented 2 years ago

Fixes #61. This change enables i2c-gpio (software i2c) for raspberry pi boards instead of the hardware i2c to work around a bug in the clock stretching in hardware i2c. Clock stretching is required by the co2 sensor (SCD30).

keenanjohnson commented 2 years ago

I'm going to deploy this now along with the balena web configuration as shown below. I think this is worth it to accept the small technical debt to increase sensor robustness for now.

We should move to seting this programmatically as part of #66

dt_params = "i2c_arm=off","i2c-gpio=on"
dt_overlay = "dwc2,dr_mode=host","i2c-gpio,bus=11,i2c_gpio_delay_us=100,i2c_gpio_sda=2,i2c_gpio_scl=3"
keenanjohnson commented 2 years ago

Deployed to the Ribbit Network fleet. Software release: c35bf3ccb713

image