How do the sensor modules in my Coding for Good Kit work?
The Coding for Good Kit uses the same plug-and-play system as the Climate Action Kit, so if you have used our kits before, everything will feel familiar. The kit adds four brand-new smart modules β a Colour Sensor, a PIR Sensor, an LCD Screen and a Temperature Probe Sensor β on top of the sensors you already know.
This article walks through each module, what it senses (or shows), and how you and your students connect and code it.
TODO (internal): This article intentionally overlaps with "How do the sensor modules in my Climate Action Kit work?" and "An in-depth look into the Climate Action Kit Sensors and Components". A human should decide whether to cross-link the three articles or fold the shared sensors into a single parent article, and should add the standard component photos used in the Climate Action Kit version.
The breakout board β the hub everything plugs into
The Breakout Board is the small circuit board that everything else plugs into β think of it as the power bar and translator for your project. Your micro:bit slides into the edge connector on the board, the board's built-in battery powers the project, and every sensor and motor talks to the micro:bit through it.
The board has separate groups of ports: ports for the white sensor modules, ports for the servo motors, and a dedicated connector for the water pump. Each port is marked with a symbol β match the symbol on the cable to the symbol on the port and you cannot go wrong. The cables are reversible, so there is no "wrong way round".
If a sensor seems like it isnt working, the first thing to check is that it is in a sensor port and not a motor port, and that the Breakout Board is charged and switched on.
The sensor and output modules in your kit
Every Coding for Good Kit ships with one of each module below, unless noted. (For the full parts list, see the Coding for Good Kit product page.)
Moisture Sensor
Measures the percentage of moisture in a medium β most often soil. Use it for auto-watering systems, hydroponics and drought-monitoring projects. Push the two metal prongs into the soil; the drier the soil, the lower the reading.
Solar Sensor
Measures the percentage of light falling on it. Great for sun-tracking solar panels, streetlights that turn on at dusk, or comparing light levels around the classroom.
Touch Sensor
A simple input that reacts to being touched. You can code for the moment of a touch (touch down), the moment the finger lifts (touch up), or how long the touch is held.
Sonar Sensor
Uses ultrasonic sound β like a bat's echolocation β to measure how far away an object is. Use it for obstacle avoidance, wildlife crossings, water-level models and parking sensors.
Line Follower with Ball & Caster
Contains three infrared sensors on the underside that detect reflective surfaces, so a rolling project can follow a line. The ball caster doubles as a third wheel for mobile builds.
Classroom tip: matte coloured tape (hockey tape works well) gives much more reliable readings than shiny electrical tape, and a matte, non-glossy floor or poster board beats a polished table top.
Rotary Dial
A dial students can turn, with a built-in push button. It reports the dial position and detects button presses β handy for setting thresholds, choosing modes, or acting as a volume/speed control in a project.
LED Light
An output module with eight independently controlled multi-colour LEDs. In block coding you can choose from up to 12 colours; in JavaScript you can address the full colour range. Use it for status indicators, alert lights and data visualisations.
Colour Sensor (new)
Detects colour, which opens up sorting and identification projects β recycling sorters, accessibility indicators, ripeness checkers and automated systems that respond to a colour cue.
TODO: Add the exact readings the Colour Sensor returns (named colours vs. RGB values), the recommended sensing distance, and the MakeCode blocks used.
PIR Sensor (new)
A passive infrared motion detector β it notices movement in front of it rather than measuring distance. Students use it for safety tools, wildlife counters, occupancy trackers and community alert systems.
TODO: Add the PIR Sensor's detection range and field of view, any warm-up time after power-on, and the MakeCode blocks used.
LCD Screen (new)
An output module that displays text and numbers, so projects can show live readings, dashboards and alerts instead of scrolling everything across the micro:bit's 5x5 LED grid. It is a great prompt for students to think about how they communicate data to a user.
TODO: Add the LCD Screen's character/line capacity and the MakeCode blocks used to write and clear text.
Temperature Probe Sensor (new)
A probe you can place in air, soil or liquid to measure temperature β useful for water-quality investigations, food-safety projects, composting, greenhouses and indoor/outdoor climate comparisons.
TODO: Add the probe's measuring range and accuracy, the units reported in MakeCode, and confirm whether the probe tip is safe for full immersion in water.
Motors and the water pump
Your kit also includes 2 continuous servo motors, 2 positional servo motors, and a peristaltic water pump with tubing (an upgraded pump designed for longer, continuous or intermittent water flow). These plug into the motor ports and pump connector rather than the sensor ports.
For the difference between the two motor types, see the existing articles "What is the difference between a Positional and Continuous Servo motors?" and "How do I know my servo motors are connected to right ports?".
How to connect a module
- Make sure the Breakout Board is charged, and slide your micro:bit into the edge connector.
- Pick a cable that reaches comfortably β short cables for compact builds, long cables or an extender for arms and towers.
- Plug one end into the module and the other into a port on the Breakout Board, matching the symbol on the port.
- Attach the module to your build using the building blocks on the back of the module.
- Switch the Breakout Board on and run your code.
There is no soldering, no wiring diagram and no polarity to worry about β students can swap modules mid-lesson without breaking anything.
Coding the modules in MakeCode
These modules are "smart": they report live values back to MakeCode, so students can watch a reading change on screen while they move, touch or cover a sensor.
To get the blocks, add the Forward Education extension in MakeCode. See the existing article "How to add the Forward EDU Extension in MakeCode" for the steps, and "Do I have the latest version of the Forward Education Coding blocks?" if your new modules do not appear β the four new Coding for Good modules need an up-to-date extension.
Once the extension is added, each module gets its own blocks β a reading block for inputs (moisture, light, distance, colour, motion, temperature) and control blocks for outputs (LED Light, LCD Screen, motors, pump).
A few things worth telling students up front:
- Pair the micro:bit with MakeCode before downloading code, or you will be dragging .hex files by hand. See "Pairing your micro:bit in MakeCode".
- If they swap to a different computer or a different micro:bit, they will need to pair again.
- The Coding for Good Kit works with every Climate Action Kit lesson, so any code your class wrote last year still runs.
If a module isn't responding
- Check the Breakout Board is charged and switched on.
- Reseat both ends of the cable, and try a different cable β a cable is the most common culprit.
- Make sure the module is in a sensor port, not a motor port.
- Try the module in a different port to rule out a damaged port.
- Confirm the Forward Education extension is up to date and that you downloaded the code to the micro:bit after your last change.
Still stuck? See "A piece is missing from my kit β how do I get a replacement?" or "How do I contact support?".