diff options
| author | Edvin <[email protected]> | 2025-05-08 11:40:26 +0200 |
|---|---|---|
| committer | Edvin <[email protected]> | 2025-05-08 11:40:26 +0200 |
| commit | c632c1cc164c67cbafa73366cf9a3409666fbb6c (patch) | |
| tree | 2427e3798d9b81b8fc65e6e21180b2b15161f75c /main.py | |
| parent | 0d2ac90175637576567668ecd9e8212341b3d26d (diff) | |
Added goal communication
Diffstat (limited to 'main.py')
| -rwxr-xr-x | main.py | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -164,8 +164,13 @@ if bto.find("Connected") != -1: sleep(0.45) NANO.write(b"Stop\n") elif bto == "420": - print("reset") - desDir = 0 + NANO.write(b"Goal\n") + print(NANO.readline()) + GPIO.output(LED, True) + goal_read = False + while goal_read == False: + goal_read = GPIO.input(PT) + GPIO.output(LED, False) elif bto == "0": NANO.write(b"Stop\n") forward = False |
