microbit/kitronic_05.py

12 lines
180 B
Python
Raw Normal View History

2021-03-21 08:40:47 +01:00
from microbit import *
def main():
while True:
value = min(1023, abs(accelerometer.get_y()))
pin0.write_analog(value)
if __name__ == "__main__":
main()