Images and animations
We can display a custom-made image with the show()
method. Let’s see a demonstration:
from microbit import * if not display.is_on(): display.on() else: print("Display is already on...") display.clear() pattern0 = Image("00000:" "11111:" "22222:" "33333:" "44444") display.show(pattern0)
Run the program to see the output. We can also define a pattern or an image in a single line in our program, as follows:
from microbit import * if not display...