-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautoCar.py
52 lines (31 loc) · 1.2 KB
/
autoCar.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
import time
from hardware import *
pinAssignBoard = {'FrontSensor':Pins['P0'][0]}
class autoCar(object):
def __init__(self):
self.FSens = Sensors(pinAssignBoard['FrontSensor'])
self.dynamics = Dynamics()
self.running = True
print pinAssignBoard['FrontSensor']
def Run(self):
while self.running == True:
self.setMission()
self.Brains()
def setMission(self):
print "what are we going to do today?"
print "how far to drive?"
self.mission = {}
self.mission['distance'] = raw_input("distance> ")
print "how fast you wanna go?"
self.mission['speed'] = raw_input("speed> ")
def Brains(self):
if(self.Lsens.clear()==True):
self.dynamics.mMotor
class Reports(object):
def __init__(self):
self.printReports = True
def run(self, *subProcesses):
while self.printReports == True:
for z in subProcesses:
z.printReport()
#some threaded process which continually prints reports