diff options
author | kartofen <mladenovnasko0@gmail.com> | 2024-02-16 18:10:45 +0200 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2024-02-16 18:10:45 +0200 |
commit | d857877ee292202ba3a469b3821561ff0d4218d2 (patch) | |
tree | 8bcf2b7e68027fe6f97ab2101b1a8e53970d945b /src/main/java/frc/robot/Robot.java | |
parent | 22d859552d0728ad0c553382ddd3cbbd140423b1 (diff) |
working gyro and subsystem
Diffstat (limited to 'src/main/java/frc/robot/Robot.java')
-rw-r--r-- | src/main/java/frc/robot/Robot.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index b68462c..8a3f9b4 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -4,6 +4,10 @@ package frc.robot; +import com.revrobotics.CANSparkMax; +import com.revrobotics.CANSparkLowLevel.MotorType; + +import edu.wpi.first.wpilibj.GenericHID; import edu.wpi.first.wpilibj.TimedRobot; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.CommandScheduler; @@ -54,8 +58,18 @@ public class Robot extends TimedRobot { } } + GenericHID controller = Constants.controller; + // CANSparkMax shooter_top = new CANSparkMax(21, MotorType.kBrushless); + // CANSparkMax shooter_bottom = new CANSparkMax(22, MotorType.kBrushless); + CANSparkMax intakeL = new CANSparkMax(31, MotorType.kBrushless); + CANSparkMax intakeR = new CANSparkMax(32, MotorType.kBrushless); + @Override - public void teleopPeriodic() {} + public void teleopPeriodic() + { + intakeL.set(controller.getRawAxis(1)); + intakeR.set(controller.getRawAxis(3)); + } @Override public void teleopExit() {} |