Introduction: Micro: Bit Fundamental Course--Button&Display

In our last blog “ Start Your Micro:bit Programming Trip ”

(https://www.elecfreaks.com/9299.html) , we have talked about the basic operation method of Microsoft Makecode. In the following articles, we will teach you some fundamental functions of blocks one by one .

Note:
For more funny creation, you can pay attention to : http://www.elecfreaks.com/

Our product store: http://www.elecfreaks.com/estore/

Step 1: Our Purpose:

To know basic usage of Makecode through studying buttons and blocks.

Step 2: Materials We Need:

Micro:bit×1

USB Cable×1

On Micro:bit, there are 5*5 LED metric dot display and 2 buttons. And today we are going to learn how to use button and LED display together.

Step 3: Our Requirement:

Press down a button to display its relative direction. Press 2 buttons together for clearing the display.

Step 4: Procedure:

Step 1:

Drag out block “on button pressed” from Input column and set the button to be “A”.

Step 5: Show Arrow Set

Under block “on button A pressed”, we insert block “show arrow”, which can make micro:bit to display directions with arrow. And here we set direction to be “west”.

Step 6: Procedure

Step 2:

Choose block “on button pressed”, cope and paste it. Then set button to be “B” and direction to be “East”.

Step 7: Procedure

Step 3:

Drag out block “on button pressed” from Input column again and set the button to be “A+B”.

Step 8: Procedure

Insert “clear screen” into this block.

Step 9: Procedure

Step 4:

In the left analog window, we can check analog operation. Click Virtual button on Micro:bot to check our program.

Step 10: Procedure

Step 5:

After confirmation, download program into Micro:bit.

Step 11: Question:

If we want to use character string to display “west” and “east”, then how to revise our program?

Note:
For more funny creation, you can pay attention to : http://www.elecfreaks.com/

Our product store: http://www.elecfreaks.com/estore/

Comments

About This Instructable

38views

0favorites

Bio: Email: louise@elecfreaks.com
More by RayM81:Make a Burglar Alarm Device With Micro:bitArduino Digital Tube Display ExperimentMicro:bit Fundamental Course: Touch Button
Add instructable to: