Skip to content

scd30: add CO2 sensor driver - #881

Merged
deadprogram merged 1 commit into
tinygo-org:devfrom
NetForces:scd30-driver
Aug 21, 2026
Merged

scd30: add CO2 sensor driver#881
deadprogram merged 1 commit into
tinygo-org:devfrom
NetForces:scd30-driver

Conversation

@NetForces

Copy link
Copy Markdown
Contributor

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

@deadprogram

Copy link
Copy Markdown
Member

Thank you for the addition @NetForces now merging.

@deadprogram
deadprogram merged commit 6791c13 into tinygo-org:dev Aug 21, 2026
1 check passed
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

2 participants