Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from microbit import *
- import music
- delay = 0
- while True:
- if button_a.was_pressed():
- delay = delay + 1
- if button_b.was_pressed():
- display.show(Image.ASLEEP)
- sleep(delay*1000)
- display.clear()
- music.play(music.RINGTONE)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement