Files
bidouilles/mu_code/accelerometer.py

16 lines
417 B
Python

# test choix de picto en fonction de l'orientation
from microbit import *
# tests
# while True:
# x = accelerometer.get_x()
# y = accelerometer.get_y()
# z = accelerometer.get_z()
# txt = "x={} y={} z={}".format(x, y, z)
# display.scroll(txt)
# sleep(500)
# neutre : X = -32, y = 1024, z = -60
# haut : X = -28, y = 1000, z = -232
# bas : X = -28, y = 1000, z = 240# Ecrit ton programme ici ;-)