SGP30 eCO2 & TVOC sensor

MATLAB + Arduino I2C SGP30 sensor support
Updated 17 Nov 2023

View License

Support for the SGP30 eCO2 and TVOC sensor
Create an arduino object with I2C.
serialDevices = serialportlist;
a = arduino(serialDevices(end),'Nano3','Libraries',{'I2C'});
Connecting to the SGP30
sgp30obj = sgp30(a);
Read the sensor values
SGPeCO2Data = sgp30.readEquivalentCarbondioxide;
SGPTVOCData = sgp30.readTotalVolatileOrganicCompounds

Cite As

Eric Prandovsky (2024). SGP30 eCO2 & TVOC sensor (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2022b
Compatible with R2022b to R2023b
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Inspired by: MATLAB Support Package for Arduino Hardware

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes