Created
March 13, 2016 11:38
-
-
Save andreagrandi/a5001bda57282465f65b to your computer and use it in GitHub Desktop.
Make microbit happy pressing button A or make it die pressing B
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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