-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHardware.java
More file actions
84 lines (69 loc) · 2.37 KB
/
Copy pathHardware.java
File metadata and controls
84 lines (69 loc) · 2.37 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
package demoman;
import edu.wpi.first.wpilibj.*;
/*
* Team 3181 Robotics
* Project: Breakaway
* Codename: Demoman
* (The Chargin Scottsman)
* Filename: Hardware.java
*/
/**
* This is where all hardware declarations occur. If you need to check
* slots, channels, etc., it's in here. Separation of logic ;).
* <p>
* Currently there aren't any functions, just a lot of static primitives
* and references.
*
* @author eric
*
*/
public class Hardware {
// Driver Station. It's a freaking Joystick.
public static DriveHub DS = new DriveHub(3);
// Robot drive system
// 1 is left; 10 is right
public static DriveSystem robotDrive = new DriveSystem(1, 10);
// Ball roller motor
public static Victor ballRoller = new Victor(4, 4);
// Winch motor
public static Jaguar winchMotor = new Jaguar(4, 3);
// Joysticks
public static Joystick rightJoystick = new Joystick(1);
public static Joystick leftJoystick = new Joystick(2);
// Solenoids
public static Solenoid[] solenoids = {
new Solenoid(1), new Solenoid(2), new Solenoid(3),
new Solenoid(4), new Solenoid(5), new Solenoid(6),
new Solenoid(7), new Solenoid(8)
};
// Digital Inputs:
// Autonomous switches
public static DigitalInput[] autonomousSwitches = {
// 4, 2 is the leftmost switch
new DigitalInput(4, 2), new DigitalInput(4, 3), new DigitalInput(4, 4)
};
// Has the kicker returned to its home position, with latch closed?
// TRUE means CLOSED
public static DigitalInput kickerLatchSwitch = new DigitalInput(4, 1);
// Kicker Sensor - Are we ready to kick
public static DigitalInput ballSensor = new DigitalInput(4, 5);
// Are we in "Stopped" mode?
// need hardware verification
// public static DigitalInput stoppedModeSwitch = new DigitalInput(9,9);
// Digital Outputs
// Kicker Ready
/* public static DigitalOutput[] kickerReady = {
new DigitalOutput(4, 3), new DigitalOutput(4, 4)
};
// Ball sensor
public static DigitalOutput[] ballReady = {
new DigitalOutput(4, 1), new DigitalOutput(4, 2)
};
// Winch Locked
public static DigitalOutput[] winchLocked = {
new DigitalOutput(4, 7), new DigitalOutput(4, 8)
};
*/
// Compressor
public static Compressor compressor = new Compressor(14, 1);
}