This recipe will show you how to create a countdown timer using the micro:bit board. The countdown timer is started each time someone presses the button A. It displays how many seconds are left before the countdown is complete. It will start at the number 9 and count down until the timer is complete, at which stage it will clear the screen. Consulting a recipe like this can be useful whenever you are thinking of creating a project that requires the incorporation of elapsed time into your script.
Creating a countdown timer
Getting ready
You will need to have the Mu text editor installed and configured, as well as your micro:bit board connected to your computer.