Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from microbit import *
while True:
reading = accelerometer.get_x()
if reading > 20:
display.show("R")
elif reading < -20:
display.show("L")
else:
display.show("-")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment