Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from microbit import *
- cur_image_pos = 0
- def checkinput():
- global cur_image_pos
- sleep(100)
- if button_a.get_presses() > 0 and cur_image_pos > 0 :
- cur_image_pos = cur_image_pos - 1
- if button_b.get_presses() > 0 and cur_image_pos < len(imagelist) - 1:
- cur_image_pos = cur_image_pos + 1
- display.show(imagelist[cur_image_pos])
- angry = Image("90009:"
- "09090:"
- "09090:"
- "00900:"
- "99999")
- imagelist = [angry, Image.ANGRY, Image.SKULL, Image.COW, Image.PACMAN,
- Image.GHOST, Image.SWORD, Image.SNAKE]
- while True:
- #display.scroll('Hello, World!')
- #display.show(angry)
- checkinput()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement