Sensors
Learn how to program your micro:bit to measure your environment using its built-in sensors
Accelerometer
An accelerometer is a motion sensor that measures movement. The accelerometer in your BBC micro:bit detects when you tilt it left to right, backwards and forwards and up and down.
There are lots of ways you can use the accelerometer in your projects. Find out more about how it works by watching the video, then choose a project to get started.
Recreate a classic game with two micro:bits
Make your own step counter with a micro:bit
Use data logging to make a better step counter
Temperature sensor
A temperature sensor is an input device that measures temperature. Your BBC micro:bit has a temperature sensor inside the processor which can give you an approximation of the air temperature.
Find out more about the temperature sensor on your micro:bit by watching the video, then choose one of the projects to program the temperature sensor.
Make a simple thermometer with your micro:bit
Sense how warm or cold it is outside
Record and study data about the world around you
Light sensor
A light sensor is an input device that measures light levels. Your BBC micro:bit uses the LEDs to sense the levels of light and lets you program your micro:bit as a light sensor.
Watch the video to find out more, then choose one of the projects to turn your micro:bit into a light sensor.
Create an automatic light that turns on when it’s dark.
Measure temperature, sound and light levels around you
Make an alarm that goes off when lights go on
Compass
A digital compass is an input sensor that detects magnetic fields. Your BBC micro:bit has an inbuilt compass that can detect the direction in which it is facing.
Watch the video to find out more, then choose a project to start using your micro:bit as a compass.
Turn your micro:bit into a simple compass
Create a simple compass to show which way is North
Has anyone opened your door?
Touch logo - new
If you have the the new micro:bit, you can use the gold logo as another input in your projects. It's like having an extra button.
The touch logo uses capacitive touch, sensing tiny changes in electrical fields to know when your finger is pressing it - just like your phone or tablet screen.
You can trigger events in your programs when you press it like a button, but also when you first touch it, when you let go and if you press it for longer.
Add an extra emotion with touch
Touch your micro:bit to light up the heart
Simple timer for the new touch logo
This content is published under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) licence.