Display Built-in Images
What you'll build¶
Animate the LED matrix by stepping through nine built-in images, one per second.
Code¶
How it works¶
MicroPython ships with dozens of ready-made 5×5 images on the Image class (Image.HEART, Image.HAPPY, Image.SAD, …).
Each display.show() replaces what is on screen, and sleep(1000) holds it for a second.
See the full list in the MicroPython images tutorial.
Try this next¶
- Put the images in a list and loop over it instead of repeating
show/sleep. - Pass the whole list to
display.show(images, delay=500)to animate in one line. - Design your own image — see Display DIY Images.