7 sensor
= us100
.US100UART(uart
)
9 Ygem
=machine
.Pin(10,machine
.Pin
.OUT
)
10 Bgem
=machine
.Pin(16,machine
.Pin
.OUT
)
11 plant
=machine
.Pin(18,machne
.Pin
.OUT
)
14 uart
= machine
.UART(1)
15 sensor
= us100
.US100UART(uart
)
19 Ygem
=machine
.Pin(10,machine
.Pin
.OUT
)
20 Bgem
=machine
.Pin(16,machine
.Pin
.OUT
)
21 plant
=machine
.Pin(18,machine
.Pin
.OUT
)
23 Ygem
.off();Bgem
.off();plant
.off()
27 distance
=sensor
.distance()
31 if distance
<=500 and distance
>=350:
36 elif distance
<=350 and distance
>=150:
40 elif distance
<=150 and distance
>75:
62 except Exception: #catches error if sensor is covered, simply passes that cycle
67 >>>>>>> 2af4f5c (more sensory wall projects
)