2018年5月9日星期三

Make a Countdown Timer with micro:bit

Countdown Timer is very common in our daily life. It helps to remind you to do something on time in case of any possible delay or error. For example, a pedometer or a baking timer. Today we are going to use micro:bit, power:bit and an acrylic base board with nylon watch band to create a simple countdown timer.

Material Needed:

Hardware Assembly

Firstly, fix your micro:bit onto power:bit with some screws.

Then, fix your power:bit onto the acrylic base board of the nylon watch band.

Programming

Click to open Makecode, write your code in the editor area.
Set startup image to display the countdown time 60min.
Press button A, then decrease 10 minutes.
Once time has been set, press button B to start countdown. When it is finished, the buzzer alarms, the screen displays an "End" and the countdown time will be reset.
You can click Download in the bottom to save your code into micro:bit.
Here's the whole program in the following:

Succeed

Now you have successfully created a countdown timer by your own. Let's try it!

没有评论:

发表评论

精选博文

How to Make a Counter with microbit

How to Make a Counter with microbit When we have boarded airplane, we often encounter a situation like this: a beautiful stewardess ca...