Get active with the accelerometer
The coronavirus pandemic and lockdown restrictions have had a huge impact on children’s physical activity levels and engagement in sport. Encourage your students to do more exercise then show them how to make a step counter (or pedometer) with their micro:bit to track their progress. The step counter uses the BBC micro:bit's accelerometer or motion sensor.
We’ve got three projects to get students up and out of their seats and develop their coding skills. Why not program your micro:bits before your sports or PE lesson and then use them to add a competitive element to fitness activities?
In these projects, students:
- learn more about the micro:bit’s accelerometer
- find out how variables work
- will be motivated to connect and use their battery packs and to create a battery pack holder
- will be inspired to learn how to modify a program to add a reset button
- measure their steps by programming the micro:bit to count how many times it is shaken
- push themselves to create more advanced step counters that make their batteries last longer and take more sensitive and accurate accelerometer readings
What you need
- micro:bit (or MakeCode simulator)
- MakeCode or Python editor
- battery pack (optional but recommended)
- something to attach the micro:bit to their shoe or leg (string, tape or Velcro) or they can simply put it in the top of their sock!
Try out these three step counters
Choose the project that best suits your students.