Build Your Own High-Concentration CO2 Detector
Quickstart Guide
In this Quick Start guide we'll connect the SparkFun CO2 Sensor - STC31 to a SparkFun IoT RedBoard - ESP32 and use the SparkFun STC31 and SHTC3 Arduino libraries to report environmentally compensated CO2 percentages. This example takes the humidity and temperature data reported by the SHTC3 environmental sensor on the breakout and feeds them to the STC31 to provide accurate CO2 measurements that are compensated with live environmental data.
If you're not familiar with using sensor breakouts, development boards or the development environments covered in this guide, refer to the Project Setup section of this guide for instructions on setting up and using the SparkFun STC31 and SHTC3 Arduino Libraries and Python Package.
Basic Assembly
Since this is a Qwiic breakout, assembling the circuit only requires connecting the sensor breakout to a Qwiic-compatible development board like the IoT RedBoard - ESP32. Connect the STC31 Breakout to the IoT RedBoard with a Qwiic cable and then connect the RedBoard to your computer with a USB-C cable like the photo below:
Note: If you are looking to follow along with the video, we used an SparkFun Thing Plus - ESP32-S2 WROOM with the Arduino Libraries: STC3x (ZIP) & SHTC3 (ZIP)