-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmap.py
More file actions
31 lines (26 loc) · 803 Bytes
/
map.py
File metadata and controls
31 lines (26 loc) · 803 Bytes
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
"""
Defines port numbers for motors and sensors.
"""
class Map(object):
def __init__(self):
# Motors have suffix 'M'. All motors use PWM.
self.frontLeftM = 3
self.frontRightM = 1
self.backLeftM = 7
self.backRightM = 0
self.climbM = 2
self.collectorM = 5
self.shooterM = 9
self.hopperM = 8
self.groundGearM = 4
# Soleniods
self.gearSol = {'in': 3, 'out': 4}
self.groundGearSol = {'in': 2, 'out': 0}
# Sensors have suffix 'S'. Gyro uses SPI, everything else uses the DIO.
self.gyroS = 0
self.allienceS = 0
self.shooterS = 1
self.hopperS = 2
# Relays
self.bumpPopR = 0
self.greenLEDR = 1