Description
This micro:bit beginner project is for people getting started with the micro:bit and with writing computer code. It requires no previous coding experience and no knowledge of the micro:bit. In fact, you don’t even really need a micro:bit because you can use the simulator available in MakeCode. If you are using an actual micro:bit, you will need to know how to plug it into your computer.
Programming Language
MakeCode Blocks
Difficulty Level
Beginner
Age Range
9 and up
Materials
Optional Materials:
- BBC micro:bit V2
- 2xAAA battery pack
- USB to MicroUSB cord
Programming the micro:bit
Develop the problem statement
The problem I am solving is:
How to make a design done in LEDs blink off and on
Write the algorithm
The algorithm involves setting the lights off or on as long as the code is running:
- Do Forever:
- Turn lights on
- Turn lights off
Write the pseudocode
This is a simple program so the pseudocode is not that much different from the algorithm. The difference here is that I am adding a pause , knowing ahead of time that it is necessary to see the image blink on and off.
- Do Forever
- Show Light Array
- Pause
- Clear Light Array
- Pause
Write and test the code
Once you are happy with the pseudocode, write the code in MakeCode.
Here is the code I wrote