SHARE
TWEET

Untitled

a guest Feb 26th, 2020 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from microbit import *
  2. import music
  3.  
  4. delay = 0
  5. while True:
  6.   if button_a.was_pressed():
  7.     delay = delay + 1
  8.   if button_b.was_pressed():
  9.     display.show(Image.ASLEEP)
  10.     sleep(delay*1000)
  11.     display.clear()
  12.     music.play(music.RINGTONE)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top