Repository navigation
Expand file tree
/
Copy pathBCMConstants.java
More file actions
49 lines (42 loc) · 2.71 KB
/
Copy pathBCMConstants.java
File metadata and controls
49 lines (42 loc) · 2.71 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
package org.firstinspires.ftc.teamcode;
public final class BCMConstants {
public static final class AnalogInputConstants {
// The voltage at open switch -Joystick at rest - oscillates around 2v with 3K3 resistors
// on engaging the switch, the voltage on the Analog Input drops down and it's
// oscillating around 0.4v => we'll consider 0.9 our threshold, so any voltage below
// that, will we considered "switch is closed"
public static final double kVoltageJoystickEngagedThreshold = 0.9;
//Analog Inputs names
public static final String kJoystickForward = "JoystickForward"; //Analog Input port #0
public static final String kJoystickBack = "JoystickBack"; //Analog Input port #1
public static final String kJoystickLeft = "JoystickLeft"; //Analog Input Port #2
public static final String kJoystickRight = "JoystickRight"; //Analog Input Port #3
}
public static final class DigitalInputConstants {
//Digital Inputs names
public static final String kStopSwitchBack = "StopSwitchBack"; //Limiting switch on Digital port #1
public static final String kStopSwitchLeft = "StopSwitchLeft"; //Limiting switch on Digital port #3
public static final String kStopSwitchRight = "StopSwitchRight"; //Limiting switch on Digital port #5
public static final String kButtonPickUpClaw = "ButtonPickUpClaw"; //Claw Trigger button on Digital port #
}
public static final class MotorConstants {
//Motors power
public static final double kMotorPowerForward = 0.70;
public static final double kMotorPowerBack = - kMotorPowerForward;
public static final double kMotorPowerLeft = -0.40;
public static final double kMotorPowerRight = -kMotorPowerLeft;
public static final double kMotorPowerStop = 0;
public static final double kMotorPowerDown = 0.30;
public static final double kMotorPowerUp = -kMotorPowerDown;
//Motors Names
public static final String kMotorLeftRight = "MotorLeftRight"; //Left and right traversing Port #1
public static final String kMotorBackForward = "MotorBackForward"; //Back and forward traversing Port #0
public static final String kMotorPickUpClaw = "MotorPickUpClaw"; //Claw Motor
//Positions
public static final double kMotorBackForwardLimitFowardPosition = 4830;
public static final double kMotorPickUpClawPickUpPosition = 500;
public static final double kMotorPickUpClawTravelPosition = 270;
public static final double kMotorPickUpClawReleasePosition = -30;
public static final double kMotorPickUpClawResetPosition = 0;
}
}