Skip to content

GM-X02B Sensor Library - #1

Merged
FacioErgoSum merged 1 commit into
mainfrom
development
Sep 24, 2026
Merged

FacioErgoSum merged 1 commit into
mainfrom
development

Conversation

@FacioErgoSum

@FacioErgoSum FacioErgoSum commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

Library covers all nine SparkFun Qwiic MEMS gas sensor boards, replaces the SparkFun_GM-602B_Arduino_Library.

One Arduino library covering all nine SparkFun Qwiic MEMS gas sensor boards
(Winsen GM-102B/202B/302B/402B/502B/512B/602B/702B/802B), replacing the
per-part GM-602B library.

- src/sfTk/sfDevGMX02B.{h,cpp}: SparkFun Toolkit driver, nine-row part table
  (default address, load resistance, response direction)
- src/SparkFun_GMX02B.h: Arduino I2C bus layer, one class per board variant
- Sensor identity is a required constructor argument, so a missing or wrong
  part declaration is a compile error rather than a silently wrong reading
- Reads the onboard ADC101C021 10-bit I2C ADC: raw counts, output voltage,
  sensor resistance, direction-normalized clean-air gas response, hardware
  threshold alerts and hardware peak tracking
- GM-102B inverted response curve handled in the driver
- Six examples, keywords.txt, Doxygen config and GitHub Actions CI
- library.properties v2.0.0, depends on SparkFun Toolkit >= 1.2.0
@FacioErgoSum FacioErgoSum changed the title GM-X02B family library v2.0.0 GM-X02B Sensor Library Sep 11, 2026

@sfe-SparkFro sfe-SparkFro left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to see all the examples using ppm instead of raw values and voltages. I know these gas sensors are notoriously inaccurate for several reasons and calibration is required to get anywhere close. But users have to deal with a single value regardless, and IMO it would be much more helpful to think in terms of ppm than raw values or voltages.

What would it take to make the uncalibrated ppm calculations be close-ish? Is there a voltage to ppm conversion in the datasheets that we can use for default conversions?

Comment thread src/sfTk/sfDevGMX02B.h Resolved
Comment thread src/SparkFun_GMX02B.h Resolved
Comment thread src/SparkFun_GMX02B.h Resolved
Comment thread src/SparkFun_GMX02B.h Resolved
Comment thread src/SparkFun_GMX02B.h Resolved
Comment thread library.properties Resolved
Comment thread src/SparkFun_GMX02B.h Resolved
@FacioErgoSum
FacioErgoSum merged commit b8b5dc9 into main Sep 24, 2026
9 checks passed
@FacioErgoSum
FacioErgoSum deleted the development branch September 24, 2026 21:46
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.

3 participants