How fast is your heart beat?
This lesson we will expand on the LED matrix by creating heart symbol. We will also explore the pause coding block as well as switching the LED's off using the clear screen block
Last updated
Was this helpful?
This lesson we will expand on the LED matrix by creating heart symbol. We will also explore the pause coding block as well as switching the LED's off using the clear screen block
Last updated
Was this helpful?
You will need to explain to the kids how something would blink. This is normally done by switch a light on and off continuously. Give them an example of switching the lights off and on at home.
You will also need to explain that the show icon block does as well as the clear screen block.
You may also need to explain to the kids how multiple block are executed one at a time, from top to bottom.
The show icon block is same like the show led block, when you select the drop down you can show the kids the different types of icons.
The clear screen simply puts all the LED's off
Click on the home button on the top of the MakeCode editor
Click on New Project
You should have a new project created.
Click on the Basic category and drag the show icon code block to the forever block
To select the clear screen block, click on Basic, then more. You will then see the clear screen block.
Drag the clear screen block and place it under the show icon block.
The simulator will now show the heart that is blinking.
You will notice that the heart beat is very fast. We we need to slow it down. In order for us to do this, we need to pause for a moment.
In order or us to pause in our program, we will need to use the pause block.
This can be found under Basic, and pause
Drag the pause block and place it underneath the clear screen block
Click in the arrow on the pause block and you will see different time options, select 2 seconds
If you look at the simulator, you will now see that the heart is blinking slower.
Pair your device and Click Download
Your device will now blink an heart.
If you have some time, ask the kids to play around with the different icons