Skip to content

Instantly share code, notes, and snippets.

@uktechreviews
Created August 3, 2017 14:10
Show Gist options
  • Save uktechreviews/989f06ccb720cd02ed43540fa7617b6d to your computer and use it in GitHub Desktop.
Save uktechreviews/989f06ccb720cd02ed43540fa7617b6d to your computer and use it in GitHub Desktop.
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