-
Notifications
You must be signed in to change notification settings - Fork 0
/
map.py
34 lines (29 loc) · 880 Bytes
/
map.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
"""
Defines port numbers for motors and sensors.
"""
class Map(object):
def __init__(self):
# Joysticks have suffix 'J'
self.leftJ = 0
self.middleJ = 1
self.rightJ = 2
# Motors have suffix 'M'. All motors use PWM.
self.frontLeftM = 3
self.frontRightM = 6
self.backLeftM = 7
self.backRightM = 1
self.beltM = 9
self.beltAxisM = 0
self.shootM = 2
self.flipM = 5
self.lift1M = 4
self.lift2M = 8
# Sensors have suffix 'S'. Gyro and sonar use analog in, everything else uses the DIO.
self.gyroS = 0
#self.sonarS = 1
self.beltAxisTS = 0
self.beltAxisBS = 1
self.flipS = 5
self.sonicTrig = 2
self.sonicEcho = 3
pass