From d857877ee292202ba3a469b3821561ff0d4218d2 Mon Sep 17 00:00:00 2001 From: kartofen Date: Fri, 16 Feb 2024 18:10:45 +0200 Subject: working gyro and subsystem --- src/main/java/frc/robot/Robot.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/main/java/frc/robot/Robot.java') 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() {} -- cgit v1.2.3