Computer 2

Thursday, March 12, 2026

Advanced Micro:bit Movie Techniques

Agenda

  1. Advanced Micro:bit movie techniques
  2. Continue working on the Micro:bit Movie project, which is due Monday.

Advanced Micro:bit Movie Techniques

In your movie, you can use your images more than once in a sequence. Just repeat the variable name for the image in the list of images for the sequence. You can also have multiple sequence lists in your movie and multiple loops with different sleep times. Look at the following code example.

from microbit import *

level1 = Image("00000:00300:03530:00300:00000")
level2 = Image("00300:03530:35753:03530:00300")
level3 = Image("03530:35753:57975:35753:03530")
level4 = Image("35753:57975:79997:57975:35753")
level5 = Image("57975:79997:99999:79997:57975")

pulsar = [level1, level2, level3, level4, level5, level4, level3, level2, level1]
flashing = [level1, level5, level1, level5, level1, level5, level1]

while True:
    for frame in pulsar:
        display.show(frame)
        sleep(200)

    sleep(400)

    for frame in pulsar:
        display.show(frame)
        sleep(80)

    sleep(400)

    for frame in flashing:
        display.show(frame)
        sleep(30)

    sleep(400)

Continue Micro:bit Movie Project

Continue working on the Micro:bit Movie project, which is due Monday. If you already have a movie that you like, you can make it more complex by adding more sequences and loops with different sleep times.

Save your program as lastname_movie.py and upload it to your OneDrive folder. It is due by the end of class on Monday, March 16.