This Arduino library provides support for the 7Semi-SCD4x (SCD40/SCD41) sensor module over I2C. It enables real-time measurement of CO₂ (ppm), temperature (°C), and humidity (%), and supports both continuous and single-shot measurement modes. The library also includes CRC8 validation and optional data-ready status polling.
- 7Semi SCD40 or SCD41 sensor module
- Arduino-compatible board
- I2C connection (SDA, SCL)
If you have downloaded the library as a ZIP file:
- Open the Arduino IDE.
- Go to:
- IDE 1.x:
Sketch > Include Library > Add .ZIP Library… - IDE 2.x:
Sketch > Include Library > Add .ZIP Library…(same menu)
- IDE 1.x:
- Select the downloaded file: 7semi_scd4x.zip
- Arduino IDE will automatically install the library into your
libraries/folder. - After installation, include the library in your sketch:
#include <7semi_scd4x.h>| SCD4x Pin | Arduino Pin |
|---|---|
| SDA | A4 (Uno) |
| SCL | A5 (Uno) |
| VCC | 3.3V / 5V |
| GND | GND |
Default I2C address:
0x62