Week 1: Beating heart - Beginner
Fundamental : Before you start doing the classwork
Click on this link
Click on Get Started
Click on I'm Student
Select Sign in with Google
You will have your account display here (this is my account that is why it shows my name).
Select your account and enter your username and password for your Google accounts.
What is it?
Make your micro:bit's heart beat using loops to create an animation.
Extra : Video explaining the task
Reminder : Open the Microbit editor
You will need to visit this website to the work: Microbit Makecode
Once you are there, click on New Project.
You have done this already many times !!
Method : How it works
The program shows a beating heart using two built-in pictures, a large and small heart, on the micro:bit's LED display.
Different images shown in a sequence create the illusion of movement: a heart getting larger and smaller.
After showing each image, the program pauses for half a second (500 milliseconds) before showing the next image.
The animation is kept going forever using an infinite loop: it repeats the sequence of showing these two images and pausing until you unplug the micro:bit.
Using loops to keep things happening is an important idea in computer programming: we have created an animation that will keep running for as long as the micro:bit has power using only a small amount of code. This is also called iteration.
Example : Code
This is the code you will need.
Warning : Task 1. Improve it
Make the heart beat faster or slower by changing the delay time.
Try animating other built-in images like the small and large diamond or square.
Create your own animations using your own designs.
Reminder : Upload your work on your google classroom
Watch these two videos to remind you on how to do this.