Move the Dot


The micro:bit boasts a vast range of on-board functionality. I’m sure you will have noticed the buttons and the LED matrix but may not have come across the accelerometer as of yet. You will have used this in the previous lesson as it is the component used for the shake function which was used in the previous ‘roll a dice’ lesson.

The challenge is to use the accelerometer to control the LED matrix and move a dot around the screen.

This challenge will give you the basis of understanding of how to use the accelerometer as a control input.

Additional Challenge

  • Think about how what you have learned can be used to create a simple chase the dot game?

Learning Points

  • Use the x and y axis of the accelerometer to control the LED matrix
  • Utilising variables to store and display numbers
  • Use the plot function for the LED matrix
  • Use IF statements to distinguish between the variable outcomes
  • Understand how the accelerometer can be used as a control input

Block Editor Code

Click the button below to download the block editor code for this challenge. The hex file is contained in a zip folder.

Kindly refer here for instructions on importing code into Micro:bit. 

This code can be imported into the micro:bit block editor.

Keep in Touch

We would love to keep in touch with you and as a result aid you along your digital making journey.

Becoming a digital maker subscriber means you will receive exclusive offers and we will keep you up to date with new resources and kits, as well as upcoming events and workshops.

Let us know how your digital maker journey is progressing. Send us pictures and videos of your awesome creations and use the hashtag below.