]>
vault307.fbx.one Git - Sensory_Wall.git/blob - us100Demo.py
6 sensor
= us100
.US100UART(uart
)
10 Ygem
=machine
.Pin(10,machine
.Pin
.OUT
)
11 Bgem
=machine
.Pin(16,machine
.Pin
.OUT
)
12 plant
=machine
.Pin(18,machine
.Pin
.OUT
)
14 Ygem
.off();Bgem
.off();plant
.off()
18 distance
=sensor
.distance()
22 if distance
<=500 and distance
>=350:
27 elif distance
<=350 and distance
>=150:
31 elif distance
<=150 and distance
>75:
53 except Exception: #catches error if sensor is covered, simply passes that cycle
54 print("HEY BOSS, SOMETHING'S WRONG") #show that error happened
56 """if KeyboardInterrupt: