Python:
Variables and DIY Images

The Code

  # Variables and DIY Images
  from microbit import *
boat = Image("05050:" "05050:" "05050:" "99999:" "09990")
display.show(boat)

The name of the variable created with the code is boat.boat is just a name that stores the data needed for the image. The numbers contain the light values for each pixel on the ground of LEDs. The variable name boat can be used in place of the image data. Each line must be enclosed in quotes, with the entire image inside parentheses.

In order to create a different custom image, using the same format as boat we can make a check with the name check like so:

  from microbit import *
check = Image("00000:" "00009:" "00090:" "90900:" "09000")
display.show(check)