Created
August 3, 2017 14:10
-
-
Save uktechreviews/989f06ccb720cd02ed43540fa7617b6d to your computer and use it in GitHub Desktop.
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 * | |
import random | |
messages =["message 1", | |
"message 2", | |
"Message 3" | |
] #You can have as many messages as you would like | |
while True: | |
display.show("8") | |
if accelerometer.was_gesture("shake"): | |
message = random.choice(messages) | |
display.scroll(message) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment