Skip to content

scd4x: adhere to the datasheet better - #895

Open
sparques wants to merge 1 commit into
tinygo-org:devfrom
sparques:dev
Open

sparques wants to merge 1 commit into
tinygo-org:devfrom
sparques:dev

Conversation

@sparques

Copy link
Copy Markdown

I was having issues using the scd4x driver; compared what it was doing to what the datasheet says should be done and fixed all the places where the two differed.

  • Checks DataReady() before reading.
  • Returns ErrDataNotReady without restarting the sensor.
  • Validates CRCs on all returned words.
  • Waits the required 30 ms after reinit.
  • Uses the correct 65535 conversion denominator.
  • Waits 30 ms for power-up before starting measurements.
  • Removes the unnecessary startup Configure() call.
  • Adds CRC and conversion tests.

- Checks DataReady() before reading.
- Returns ErrDataNotReady without restarting the sensor.
- Validates CRCs on all returned words.
- Waits the required 30 ms after reinit.
- Uses the correct 65535 conversion denominator.
- Waits 30 ms for power-up before starting measurements.
- Removes the unnecessary startup Configure() call.
- Adds CRC and conversion tests.
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.

1 participant