summaryrefslogtreecommitdiff
path: root/src/main/java/frc/robot/Constants.java
blob: 6d471db0fbcc59187eb2cb3af6b8f47f74f53e0b (plain)
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
package frc.robot;

import com.revrobotics.CANSparkMax;
import com.revrobotics.CANSparkLowLevel.MotorType;

import edu.wpi.first.wpilibj.Encoder;
import edu.wpi.first.wpilibj.GenericHID;
import edu.wpi.first.wpilibj.I2C;
import edu.wpi.first.wpilibj.I2C.Port;
import frc.robot.util.IMUGyro;

public class Constants 
{
    public static final GenericHID controller = new GenericHID(1);

    public static final double DriveMaxSpeed = 5; // m/s
    public static final double DriveMaxAngular = Math.PI; // rad/s?

    public static final double WheelRadius = 0.0254; // in meters
    public static final double TrackWidth = 0.74;  // in meters

    public static final double EncoderResolution = 4096;
    
    public static final IMUGyro gyro = new IMUGyro(new I2C(Port.kOnboard, 0x68));

    public static final CANSparkMax motorL_leader = new CANSparkMax(11, MotorType.kBrushed);
    public static final CANSparkMax motorL_follower = new CANSparkMax(12, MotorType.kBrushed);
    public static final CANSparkMax motorR_leader = new CANSparkMax(13, MotorType.kBrushed);
    public static final CANSparkMax motorR_follower = new CANSparkMax(14, MotorType.kBrushed);

    public static final Encoder encoderL = new Encoder(0, 1);
    public static final Encoder encoderR = new Encoder(2, 3);
}