ESP32 Gallery

CO2 MONITOR / ESP32 APPLICATION

CO₂ Monitor

An ESP32-based CO2 monitor that logs readings to a SQLite database and displays them through a Django web application.

CO₂ Monitor
Open project preview ↗
About this project

About this project

An MH-Z19C CO2 sensor bolted to a Cheap Yellow Display, sampling once a second and pushing the readings to a Django site that keeps them in SQLite. The CYD shows live values with LVGL and a TFT_eSPI/XPT2046 setup; because the live number is already on the screen, uploads are batched, 240 samples posted every 4 minutes to save power, each tagged with building, room number, mode and Unix timestamp. The server side is a Django app with a Bearer-token POST endpoint at /api/log/, gunicorn behind Caddy, and a 3D-printed case adapted from another CYD design. A 7-second press of a button zeroes the sensor to 400 ppm, meant to be done outdoors. Sending more than 240 samples per POST can fail with connection refused, which the sketch's buffer size setting controls.

From the README

From the README

Dependency
Django for web app, API endpoint, and SQLite database
Feature
POST requests will be made every 4 minutes to reduce power usage
Feature
Zero the CO2 sensor to 400 ppm by depressing the button for 7 seconds
Limit
Increasing the number of samples in each POST can cause the POSTs to fail

Hardware

Native board: ESP32-2432S028R (CYD)

Boards: ESP32

ESP32-class board. Verify the exact board revision, display, power source and wiring in the upstream build guide.

Media credit & rights

Upstream project media · rights remain with its owner · Credit: NathanPervin

Screenshots from the upstream README. Code and firmware were not executed. License notices are included.

View original source ↗ Copyright & removal · Reviewed

More projects on these boards

Handwritten Clock Sleep Number Remote 2D LED Matrix A Ball Robot Based On ESP32 ACT1026 ESP32 AI Quota Monitor

Source repository ↗

Browse all projects

See what an ESP32 project looks like, and whether it runs on your board.

Sort

FILTERS

Browse by form factor. Check the exact board, chip and peripherals before installing.

MADE SOMETHING?

Give your project a little spotlight.

Repository links do not imply author endorsement or verified hardware compatibility. Check the upstream safety guidance before powering or flashing a build.

Try it

Project source ↗
Build & safety

Open project page ↗
FROM YOUR WORKBENCH

Small board.
Big idea.

Share what you've made.

Automatic checks start now. Most reviews finish in 1–3 days.

Prefer GitHub? Open an issue ↗