/ (WHEEL_SPROCKET_DIAMETER) * WHEEL_DIAMETER;
public AnalogInput channel;
+
+ // Gyro stuff
+ private final static double NANOSECONDS_PER_SECOND = 1000000000;
+ short rawValue;
public FirebotGyro gyro;
+ double initialSpeedNanoseconds;
+ double finalSpeedNanoseconds;
+ double initialSpeedSeconds;
+ double finalSpeedSeconds;
+ double deltaSpeed;
+ double degrees;
+
public DriveTrain() {
frontLeft = new CANTalon(Constants.DriveTrain.FRONT_LEFT);
frontRight = new CANTalon(Constants.DriveTrain.FRONT_RIGHT);
rightEncoder.setDistancePerPulse(INCHES_PER_PULSE);
gyro = new FirebotGyro(I2C.Port.kOnboard, (byte) 0x68);
-
+ gyro.initialize();
}
@Override
this.rearLeft.set(leftSpeed);
this.rearRight.set(-rightSpeed);
}
-
}