Skip to content

Instantly share code, notes, and snippets.

@andreagrandi
Created March 13, 2016 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreagrandi/a5001bda57282465f65b to your computer and use it in GitHub Desktop.
Save andreagrandi/a5001bda57282465f65b to your computer and use it in GitHub Desktop.
Make microbit happy pressing button A or make it die pressing B
from microbit import *
while True:
if button_a.is_pressed():
display.show(Image.HAPPY)
elif button_b.is_pressed():
break
else:
display.show(Image.SAD)
display.clear()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment