Skip to content

Instantly share code, notes, and snippets.

@ShawnHymel
Created August 23, 2016 03:53
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 ShawnHymel/715a5225674904088a0d12bee3cace5f to your computer and use it in GitHub Desktop.
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
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