Skip to Content

Beating Heart

A robot with a beating heart reminds us that emotion is not just human—it can be engineered to connect

Cynthia Breazeal


Introduction

The 'Beating Heart' project is a fun and simple activity using the BBC microbit. It shows a heart that appears to beat (grow and shrink) on the LED screen. This project is perfect for beginners and helps you learn how to use basic animations.

Learning Outcomes

- How to animate images on the microbit.

- How to use 'show icon' and 'pause' blocks.

- How to make your own creative projects.

Pre- requisite Knowledge

Before start of this project, students should know about:-

1. How to use and utilize Microbit.

2. How to code using the MakeCode website.

3. They should have knowledge about microbit and its features.



Materials required

  1. BBC microbit
  2. USB cable
  3. Computer or tablet
  4. Battery pack (optional)
  5. Access to MakeCode website (https://makecode.microbit.org)

Steps to Make the Beating Heart

1. Go to https://makecode.microbit.org

2. Start a new project.

3. Drag the 'forever' block into the workspace.

4. Inside the 'forever' block, add two 'show icon' blocks.

5. Choose the big heart and small heart icons.

6. Add a 'pause' block between them to make the heart-beat.

7. Download the code and transfer it to your microbit.

8. Watch the heart beat again and again!

Code for this project


Fun Ideas

- Add a sound every time the heart beats (for microbit V2).

- Use buttons to start or stop the heart.

- Change the pause time to make the heart beat faster or slower.

Conclusion

  • The Beating Heart project is a simple way to learn how to animate pictures using code. 
  • It’s fun, easy, and helps you understand how microbit works.

Output


 
0 0

There are no comments for now.