Sensors
Learn how to program your micro:bit to measure your environment using its built-in sensors
Building on your learning in the LEDs and buttons sets, these projects and videos will show you how to program your micro:bit to sense movement, light, temperature and magnetic fields.
Each set of projects is designed to build your understanding and confidence progressively. You can pick one or work through them all to develop your understanding of using the micro:bit’s sensors.
Set 1: Accelerometer games
In this sequence of projects, you’ll learn how to use the accelerometer and create dice and a game with your micro:bit.
Set 2: Accelerometer step counters
Learn how to use the accelerometer to program increasingly sophisticated step counters.
Set 3: Temperature
Learn how to transform your micro:bit into a thermometer.
Learn more about the micro:bit's temperature sensor
Set 4: Light
Discover how to use the micro:bit's built-in light sensor, starting with the 'Sunlight sensor' project we met in the LEDs and buttons set.
Learn more about the micro:bit's light sensor
Set 5: Compass
Transform your micro:bit into a compass and learn how to use it to sense if magnets are near
Learn more about the compass on the micro:bit
Set 6: Touch logo - new
The new micro:bit with sound has a gold logo on the front that works as a touch sensor. These projects show you how you can use it as an extra input.
Learn more about the touch logo on the new micro:bit
This content is published under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) licence.