Carbon Footprint Tracker with Calliope Mini

In this project, learners explore carbon footprint and air quality using the Calliope Mini and a carbon dioxide (CO₂) sensor to measure real environmental data. They collect CO₂ readings from classrooms, homes, or outdoor spaces and discover how human activities affect air quality. We have included extra challenges that encourage learners to compare different locations, times, and activities, making learning engaging and meaningful. Through this hands-on experience, learners build problem-solving skills, data awareness, and environmental responsibility, while learning how robotics, coding, science, and smart technologies can support healthier and more climate-friendly communities

ItemPurpose
Calliope Mini V3Main microcontroller that reads CO₂ data
Official Calliope SCD40 CO₂ SensorMeasures CO₂ levels
Grove CableConnects the sensor to the Calliope Mini
USB CablePowers and programs the Calliope Mini
Jumper Wires (optional)For additional extensions or indicators

Wiring this project is very easy because the official Calliope CO₂ sensor uses a Grove I²C connector, which means everything is plug-and-play.

The connector only fits one way, so you cannot plug it in incorrectly.

  1. Take the Grove cable that comes with the CO₂ sensor.

  2. Plug one end of the Grove cable into the SCD40 CO₂ sensor.

  3. Plug the other end of the Grove cable into the I²C Grove port on the Calliope Mini.

  4. That’s it , the connection is complete.

There are no extra jumper wires, no resistors, and no complicated wiring. Once everything is plugged in, the Calliope Mini will continuously read real-time CO₂ levels and show the air-quality status directly on its LED display.

Follow these steps carefully to open and explore the project in MakeCode for Calliope Mini:

Plug in your Calliope Mini to your computer using a USB cable, then follow the steps in the video to upload your code and bring your project to life!

Code BlockWhat It Does
set co2 to 0Creates a variable called co2 and sets its starting value to 0. This variable will store the CO₂ reading from the sensor.
pause 5000 msWaits 5 seconds to give the CO₂ sensor time to power on and get ready before taking readings.
foreverRepeats all the blocks inside it continuously, so the air quality is checked again and again.
set co2 to get CO2 from SCD40 sensorReads the current CO₂ level from the SCD40 sensor and saves the value (in ppm) into the co2 variable.
show string "CO2:" + co2Displays the text “CO2:” followed by the measured CO₂ value on the LED screen.
if co2 < 600 thenChecks whether the CO₂ level is below 600 ppm, which means the air quality is good.
show happy iconShows a happy face to indicate clean and healthy air.
elseRuns when the CO₂ value is 600 ppm or higher.
show sad iconShows a sad face to warn that the air is polluted or not fresh.
pause 2000 msWaits 2 seconds before taking the next CO₂ reading.

  • IMPORTANT: Make sure the SCD40 extension is added in MakeCode— go to Extensions → search “SCD40” → Add. Without it, SCD40.get_co2() will show errors like “cannot find SCD40.”
  • Sensor not detected: Check the Grove cable is firmly connected to the I²C port.

  • Icons not changing: CO₂ levels may be stable; try breathing near the sensor for a moment (CO₂ rises).

  • Scrolling text too fast: Increase pause time from 2000ms to 3000ms.

  • Extension missing: Go to Extensions → search “SCD30” or paste the GitHub URL to add it again.

  • You learned how environmental sensors measure CO₂, temperature, and humidity.

  • You discovered how microcontrollers communicate using the I²C protocol.

  • You practiced wiring the sensor to the Calliope Mini using a simple Grove connection.

  • You wrote code that reads real-time environmental data.

  • You understood how CO₂ levels relate to our carbon footprint.

  • You explored how digital tools can monitor and improve indoor air quality.

  • You learned why tracking CO₂ is important for health, safety, and climate action.

Here are fun ways to make your Carbon Footprint Tracker even more exciting:

  • Add a buzzer that beeps when CO₂ gets too high.

  • Connect an LED traffic-light module (green/yellow/red) to make a CO₂ “Air Quality Stoplight.”

  • Create a data logging system that saves CO₂ levels every minute.

  • Attach a small fan that turns ON automatically when CO₂ is high.

  • Build a cardboard “Air Quality Station” with your own graphics and labels.

Use Edge Impulse to build, train, and deploy machine learning (ML) to models make their air quality project smart and impactful. The AI learns from CO₂ levels and recognizes what clean air and polluted air look like.

For example:

  • Air Quality Predictor: The Calliope Mini observes how CO₂ changes in different places and learns when air is fresh or getting unhealthy.
  • Early Helper Action: When the AI predicts poor air quality, it can turn on a warning light or show a symbol to remind students to open windows or go outside.
  • Fun Test Game: Students test the AI by visiting different rooms and seeing if it guesses the air quality correctly.