forked from pranavdasan/FLL2022
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testing.py
64 lines (49 loc) · 1.03 KB
/
testing.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env python3
from ev3dev2.button import Button
from ev3dev2.sound import Sound
from time import sleep
import NorthWestSide
import truck
import Navigation
btn = Button()
#PUT THE FUNCTION IN THE ELSE STATEMENT
def left(state):
if state:
pass
else:
truck.truck_3(Navigation.tank_init())
def right(state):
if state:
pass
else:
pass
def up(state):
if state:
pass
else:
NorthWestSide.Coachie_Code()
def down(state):
if state:
pass
else:
pass
def enter(state):
if state:
pass
else:
pass
def run():
btn.on_left = left
btn.on_right = right
btn.on_up = up
btn.on_down = down
btn.on_enter = enter
# This loop checks button states continuously (every 0.01s).
# If the new state differs from the old state then the appropriate
# button event handlers are called.
while True:
btn.process()
sleep(0.01)
#Execute Northide Missions
if __name__ == "__main__":
run()