Created
August 23, 2016 03:53
-
-
Save ShawnHymel/715a5225674904088a0d12bee3cace5f to your computer and use it in GitHub Desktop.
Shows a happy face by default but scrolls "A" when A is pressed and "B" when B is pressed
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.scroll("A") | |
elif button_b.is_pressed(): | |
display.scroll("B") | |
else: | |
display.show(Image.HAPPY) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment