Created
March 18, 2016 15:31
-
-
Save andreagrandi/9d749543888cc5c7b08c to your computer and use it in GitHub Desktop.
This file contains hidden or 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: | |
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