-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRobotMap.java
More file actions
58 lines (46 loc) · 2.52 KB
/
RobotMap.java
File metadata and controls
58 lines (46 loc) · 2.52 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
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package frc.robot;
import com.revrobotics.CANSparkMax;
import com.revrobotics.CANSparkMaxLowLevel.MotorType;
import edu.wpi.first.wpilibj.AnalogInput;
import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.Servo;
import edu.wpi.first.wpilibj.Solenoid;
/**
* The RobotMap is a mapping from the ports sensors and actuators are wired into
* to a variable name. This provides flexibility changing wiring, makes checking
* the wiring easier and significantly reduces the number of magic numbers
* floating around.
*/
public class RobotMap {
// For example to map the left and right motors, you could define the
// following variables to use with your drivetrain subsystem.
// public static int leftMotor = 1;
// public static int rightMotor = 2;
// If you are using multiple modules, make sure to define both the port
// number and the module. For example you with a rangefinder:
// public static int rangefinderPort = 1;
// public static int rangefinderModule = 1;
public static CANSparkMax climber = new CANSparkMax(7, MotorType.kBrushless);
public static CANSparkMax climber2 = new CANSparkMax(8, MotorType.kBrushless);
public static CANSparkMax left1 = new CANSparkMax(5, MotorType.kBrushless);
public static CANSparkMax left2 = new CANSparkMax(1, MotorType.kBrushless);
public static CANSparkMax right1 = new CANSparkMax(2, MotorType.kBrushless);
public static CANSparkMax right2 = new CANSparkMax(3, MotorType.kBrushless);
public static Solenoid driveShifter = new Solenoid(2);
public static CANSparkMax intake = new CANSparkMax(6, MotorType.kBrushless);
public static CANSparkMax winch = new CANSparkMax(4, MotorType.kBrushless);
// PNEUMATICS
// public static Solenoid intakePiston = new Solenoid(0);
// public static final Servo cameraServo = new Servo(0);
// Hall effect sensors
public static DigitalInput winchUpperSwitch = new DigitalInput(0);
public static DigitalInput winchLowerSwitch = new DigitalInput(1);
// ultrasonic sensor
public static AnalogInput ultrasonicSensor = new AnalogInput(0);
}