【You can do it all】Microbit Timer Stopwatch

Bookmark (0)
ClosePlease loginn

Project introduction:

Timers we use every day,It can also be usedMicrobitproduced. The following will teach how to program, while makingThe finished product is that when you press A, the timing will start; when you press B, the timing will stop, and then pressing A+B at the same time will show how much time has passed.

List of materials:

  1. Microbit

Instructions

Step

programming steps

1) Enterwww.makecode.microbit.org's website

2) Create a new project named Timer

3) The part where the timing starts:

-In "Input", find the "When button A is pressed" block and pull it out

-Create a variable named "start"

-existUnder the variable, look for "Variable Start is set to 0", and then pull out this block

-Then pull out the "running time (ms)" in the input more and put it in 0

- Add the "display text" building block, hit S to indicate Start

4) The part where the timing ends:

-In "Input", find the "When button A is pressed" block and pull it out, then change "A" to "B"

-Create a variable named "end"

-existUnder the variable, look for "the variable end is set to 0", and then pull out the block

-Then pull out the "running time (ms)" in the input more and put it in 0

- Add the "display text" building block, hit E to end End

5)the part showing the time

-In "input", find the block of "when button A is pressed" and pull it out, then change "A" to "A+B"

-Create a variable named "time"

-pull out "variabletimeset as0” The building blocks, and then the coefficients are pulled into the surface "0 - 0" release0into the face

-The formula will be "endreducestart"to calculate a time difference

-Add the "display number" building block, pay attention to dividing the number by 1000 to know how many seconds

6) After completing the programming, you can test it on the simulator on the left/download to Microbit

About this project

Thematic label: Microbit

Comments

There are no reviews yet.

Be the first to review “【你都可以做到】Microbit 計時器 Stopwatch”

Your email address will not be published.

Projects you might be interested in

by: s18191420

偷步車,靈感內衣,因為車速度較慢,所以我想用較長的東西到達終點

0

這隻漂流船叫做坦克漂流船,為什麼他叫坦克飄流船呢?因為他的外型看起來很像一輛坦克,所以我為他命名為坦克漂流船。

0
by: a19091122

我的車叫做,海陸彩虹夢幻車,它可以在陸地行走或者在海面行走的,只要你撳一個掣就可以啟動它行走。

0

Edit Project

Name your topic

Add cover photo

Briefly introduce your project (no more than 200 words)

List the materials required for this project (one material per line)

Add keywords or tags about your project

Please select a topic

Please select the level

Which of the following platform(s) do you use for your topic?

1

Paste the Youtube link

1

Paste the Youtube link

Edit Project

Name your topic

Add cover photo

Briefly introduce your project (no more than 200 words)

List the materials required for this project (one material per line)

Add keywords or tags about your project

Please select a topic

Please select the level

Which of the following platform(s) do you use for your topic?

1

Paste the Youtube link

1

Paste the Youtube link

Login