Micro:bit - Using the accelerometer - Barclays Code Playground

 Key Stage: Key Stage 2  Coding Language: Micro:bit  Resource type: Lesson plan + teacher guide

Resource overview

Lots of modern devices are able to tell what position they are in using built in accelerometers to measure their precise orientation. The Micro:bit's accelerometer can be used in the same way so you can use it as a controller or a sensor to start or interrupt your program. Use these resources to help your class learn the basics of how to use the accelerometer.

  • Key resource information

    • You will need: Laptops or desktop computers, BBC micro:bits (one per computer), https://microbit.org


  • Teaching assessment opportunities

    • Try the first activity again – or use the step counters during a PE lesson. 
    • Did the micro:bits work? 
    • Who had the most steps on their counter after the activity?
  • Lesson length

    • 45 minutes


  • Pupil objectives

    • "I can explain what an accelerometer measures, and can code my micro:bit to use the accelerometer in a meaningful way”
    • “I can design and construct models and explain my solutions.”
    • “I can demonstrate a range of basic problem solving skills by building simple programs to carry out a given task, using an appropriate language.”  

Extension activities

Activity book

Micro:bit tools

This was our first workbook for the BBC micro:bit and has a selection of simple projects to help you get started. 

Activity video

Noughts and crosses challenge

Help us finish off our noughts and crosses game - we need you to add the code to let the game know who has won.


Building your curriculum

Any questions?

Code Playground is all about offering the support you need. If you have a question, comment or suggestion, please don’t hesitate to get in touch. We’d love to hear from you.