Timers are essential items that are useful to help us keep to specific pockets of time especially when we need to cook or doing something within a time limit. We can buy countdown timers off the shelf or we can build our own personalized version.
- Using buttons to change the value of a variable
- Playing tones on the buzzer when a condition is fulfilled
To download the code below, kindly right click to save file.
What Will Happen?
Press the button A and B on the micro:bit to choose the number of seconds the timer would count down to. To begin, shake the Tembusu board to start the timer. Once the timer reaches 0, the buzzer will sound off until the timer is reset again.
Try changing the countdown number to an animation instead and customise your own alarm tune.