Built-In Images#

TODO

The BBC micro:bit has 64 built-in images that can be displayed using Python on the 5x5 LED matrix display.

Displaying Built-In Image#

To display a built-in image, the following line of code is used:

display.show(Image.ENTER_IMAGE)#

Note

The image name is always in uppercase.

# Imports go at the top
from microbit import *

# Display the heart image
display.show(Image.HEART)       

built-in-heart-example


Built-In Image Inventory#

The built-in images can separated into the following categories:

  • Affirmations

  • Arrows

  • Animals

  • Clocks

  • Faces

  • Music

  • Miscellaneous

These categories and images are presented below:

Affirmations#

Affirmation

Code

built-in-no

Image.NO

built-in-yes

Image.YES

Arrows#

Arrow

Code

built-in-arrow-e

Image.ARROW_E

built-in-arrow-n

Image.ARROW_N

built-in-arrow-ne

Image.ARROW_NE

built-in-arrow-nw

Image.ARROW_NW

built-in-arrow-s

Image.ARROW_S

built-in-arrow-se

Image.ARROW_SE

built-in-arrow-sw

Image.ARROW_SW

built-in-arrow-w

Image.ARROW_W

Animals#

Animal

Code

built-in-butterfly

Image.BUTTERFLY

built-in-cow

Image.COW

built-in-duck

Image.DUCK

built-in-giraffe

Image.GIRAFFE

built-in-rabbit

Image.RABBIT

built-in-snake

Image.SNAKE

built-in-tortoise

Image.TORTOISE

Clocks#

Clock

Code

built-in-clock-01

Image.CLOCK1

built-in-clock-02

Image.CLOCK2

built-in-clock-03

Image.CLOCK3

built-in-clock-04

Image.CLOCK4

built-in-clock-05

Image.CLOCK5

built-in-clock-06

Image.CLOCK6

built-in-clock-07

Image.CLOCK7

built-in-clock-08

Image.CLOCK8

built-in-clock-09

Image.CLOCK9

built-in-clock-10

Image.CLOCK10

built-in-clock-11

Image.CLOCK11

built-in-clock-12

Image.CLOCK12

Faces#

Face

Code

built-in-angry

Image.ANGRY

built-in-asleep

Image.ASLEEP

built-in-confused

Image.CONFUSED

built-in-fabulous

Image.FABULOUS

built-in-happy

Image.HAPPY

built-in-meh

Image.MEH

built-in-sad

Image.SAD

built-in-silly

Image.SILLY

built-in-smile

Image.SMILE

Music Notes#

Music Note

built-in-music-crotchet

Image.CROTCHET

built-in-music-quaver

Image.QUAVER

built-in-music-quavers

Image.QUAVERS

Shapes#

Shape

Code

built-in-diamond

Image.DIAMOND

built-in-diamond-small

Image.DIAMOND_SMALL

built-in-heart

Image.HEART

built-in-heart-small

Image.HEART_SMALL

built-in-square

Image.SQUARE

built-in-square-small

Image.SQUARE_SMALL

built-in-triangle

Image.TRIANGLE

built-in-triangle-left

Image.TRIANGLE_LEFT

Miscellaneous#

Miscellaneous Image

Code

built-in-chessboard

Image.CHESSBOARD

built-in-ghost

Image.GHOST

built-in-house

Image.HOUSE

built-in-pacman

Image.PACMAN

built-in-pitchfork

Image.PITCHFORK

built-in-rollerscate

Image.ROLLERSKATE

built-in-scissors

Image.SCISSORS

built-in-skull

Image.SKULL

built-in-stickfigure

Image.STICKFIGURE

built-in-sword

Image.SWORD

built-in-target

Image.TARGET

built-in-tshirt

Image.TSHIRT

built-in-umbrella

Image.UMBRELLA

built-in-xmas

Image.XMAS

Debugging#

The following image is intended to be displayed on the micro:bit, but there is an error in the code.

quiz-image

Which line of code is correct for displaying the image above?

A: display.scroll(Image.HOUSE)

B: display(Image.HOUSE)

C: display.show(Image.house)

D: display.show(Image.HOUSE)