This repository was archived by the owner on Jul 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +74
-1
lines changed Expand file tree Collapse file tree 3 files changed +74
-1
lines changed Original file line number Diff line number Diff line change @@ -19,4 +19,15 @@ public static class mapDriveTrain {
1919 public static final int FRONT_LEFT_MOTOR = 2 ;
2020 public static final int BACK_LEFT_MOTOR = 3 ;
2121 }
22- }
22+
23+ public static class mapIntake {
24+ public static final int TOP_MOTOR_CAN = 20 ;
25+ public static final int BOTTOM_MOTOR_CAN = 21 ;
26+ }
27+
28+ public static class mapHopper {
29+ public static final int HOPPER_MOTOR = 30 ;
30+ public static final int GAME_PIECE_HOPPER_DIO = 1 ;
31+ }
32+
33+ }
Original file line number Diff line number Diff line change 1+ // Copyright (c) FIRST and other WPILib contributors.
2+ // Open Source Software; you can modify and/or share it under the terms of
3+ // the WPILib BSD license file in the root directory of this project.
4+
5+ package frc .robot .subsystems ;
6+
7+ import com .ctre .phoenix6 .hardware .TalonFX ;
8+
9+ import edu .wpi .first .wpilibj .DigitalInput ;
10+ import edu .wpi .first .wpilibj2 .command .SubsystemBase ;
11+ import frc .robot .RobotMap ;
12+
13+ public class Hopper extends SubsystemBase {
14+ /** Creates a new Hopper. */
15+ TalonFX HopperMotor ;
16+ DigitalInput HopperSensor ;
17+
18+ public Hopper () {
19+ HopperMotor = new TalonFX (RobotMap .mapHopper .HOPPER_MOTOR );
20+ HopperSensor = new DigitalInput (RobotMap .mapHopper .GAME_PIECE_HOPPER_DIO );
21+
22+ }
23+
24+ public void setHopperMotorSpeed (double speed ) {
25+ HopperMotor .set (speed );
26+ }
27+
28+ public void setHopperMotorNuetralOutput () {
29+ HopperMotor .set (0 );
30+ }
31+
32+ @ Override
33+ public void periodic () {
34+
35+ }
36+ }
Original file line number Diff line number Diff line change 1+ // Copyright (c) FIRST and other WPILib contributors.
2+ // Open Source Software; you can modify and/or share it under the terms of
3+ // the WPILib BSD license file in the root directory of this project.
4+
5+ package frc .robot .subsystems ;
6+
7+ import com .ctre .phoenix6 .hardware .TalonFX ;
8+
9+ import edu .wpi .first .wpilibj2 .command .SubsystemBase ;
10+ import frc .robot .RobotMap ;
11+
12+ public class Intake extends SubsystemBase {
13+ /** Creates a new Intake. */
14+ TalonFX topMotor ;
15+ TalonFX bottomMotor ;
16+
17+ public Intake () {
18+ topMotor = new TalonFX (RobotMap .mapIntake .TOP_MOTOR_CAN );
19+ bottomMotor = new TalonFX (RobotMap .mapIntake .BOTTOM_MOTOR_CAN );
20+ }
21+
22+ @ Override
23+ public void periodic () {
24+ // This method will be called once per scheduler run
25+ }
26+ }
You can’t perform that action at this time.
0 commit comments