Project 1: Heartbeat

Click to download the code for this lesson
(1)Project Description
(1) Project DescriptionThis project is easy to conduct with a micro:bit V2 main board, a Micro USB cable and a computer. The micro:bit LED dot matrix will display a relatively big heart-shaped pattern and then a smaller one. This alternative change of this pattern is like heart beating. This experiment serves as a starter for your entry to the programming world.
(2)Components Needed:
Micro:bit main board V2
Micro USB cable
(3)Test Code:
Attach the Micro:bit main board V2 to your computer via the Micro USB cable and begin editing.

Complete Program :

Note: the “on start” means that the code in this block only executes once, while “forever” implies that the code runs cyclically.
(4)Test Results:
After uploading the code, you will see a heartbeat effect appear on the Microbit board.
