Premade Images
Sometimes you might want the micro:bit module to simply show an image instead of scrolling text. We can do this with the show icon block, using premade images from the Image object. For example: show icon (DUCK).
Example project: Image
- Enter, name, and flash the image project to your micro:bit.
You should see a duck appear on your micro:bit module’s LED matrix, like the picture shown above.
- Replace DUCK with a different premade image from the lists below, and re-flash your program.
- Try some more. There are many to choose from!
Try This: Image Sequence
You have displayed a single image with a single block of code. To display a series of images, place the pause block between them. The pause block pauses the micro:bit module for a specified number of milliseconds, giving you time to see the image on the display. For example:
…will show an image of a heart for half a second (500 milliseconds), then show an image of a small heart for another half a second. Try it!
Example project: images
- Enter, name, and flash the images project to your micro:bit.
Your Turn – Heartbeat
In the project images, the heart looks as if it beats once.
- Can you modify your project to make the heart to beat 5 times?
- After you get the heart to beat 5 times, make the heart beat faster.
- Can you make the heart beat slower?