Skip to content

scd30: add CO2 sensor driver - #881

Open
NetForces wants to merge 1 commit into
tinygo-org:devfrom
NetForces:scd30-driver
Open

scd30: add CO2 sensor driver#881
NetForces wants to merge 1 commit into
tinygo-org:devfrom
NetForces:scd30-driver

Conversation

@NetForces

Copy link
Copy Markdown

Closes #880.

Summary

  • add an I2C driver for the Sensirion SCD30 CO2, temperature, and humidity sensor
  • implement the drivers.Sensor API with cached fixed-point measurements
  • support measurement interval and automatic self-calibration configuration, ambient-pressure compensation, data-ready checks, and continuous measurement start/stop
  • validate Sensirion CRCs and use fixed-size device buffers
  • add protocol tests, a Pico example, and smoke-test coverage

The protocol implementation this was extracted from has been exercised with an SCD30 on an M5Stack CoreInk using a clock-stretching-capable software I2C bus.

Validation

  • make fmt-check
  • make unit-test
  • go vet ./scd30
  • TinyGo v0.41.1 Pico build for examples/scd30
  • make smoke-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add driver for Sensirion SCD30 CO2 sensor

1 participant