All tutorials

MicroFit: Your very own Step Counter

microbitmakecodeBeginner ⏱ 10 mins

Overview

Ever wondered how a smartwatch or fitness band counts your steps? In this project, you're going to build your very own step counter using a !

Inside your micro:bit is a clever little sensor called an . It can feel when the micro:bit moves. We'll use it to spot every step you take, add them up, and show the total on the (the grid of lights on the front).

The best bit? When you're done, you'll have a real working fitness tracker you can pop on and take outside. Don't worry if something doesn't work first time, that's all part of coding. Let's give it a go!

🎯

What you'll learn

  • How a light sensor measures the light around it
  • How to use an if/else block to make a decision
  • How to switch an RGB LED on and off automatically