Skip to content

Commit

Permalink
created basic constants for a motor in Hopper and set up values for n… (
Browse files Browse the repository at this point in the history
#3)

* created basic constants for a motor in Hopper and set up values for next time🦟™️e

mew maow mew maow lalalalala
mew maow mew maow lalalalala

* removed unsessiIARUUY input

are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy, are you happy,
  • Loading branch information
BrodyKarr authored Oct 19, 2024
1 parent 46a2e64 commit c2def65
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/main/java/frc/robot/RobotMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@
/** Contains all ports on our robot */
public class RobotMap {

public static class mapControllers {
public static final int DRIVER_USB = 0;
public static final int OPERATOR_USB = 1;
}
public static class mapControllers {
public static final int DRIVER_USB = 0;
public static final int OPERATOR_USB = 1;
}

public static class mapHopper {
public static final int HOPPER_MOTOR = 30;
public static final int GAME_PIECE_HOPPER_DIO = 1;
}

}
36 changes: 36 additions & 0 deletions src/main/java/frc/robot/subsystems/Hopper.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.

package frc.robot.subsystems;

import com.ctre.phoenix6.hardware.TalonFX;

import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.RobotMap;

public class Hopper extends SubsystemBase {
/** Creates a new Hopper. */
TalonFX HopperMotor;
DigitalInput HopperSensor;

public Hopper() {
HopperMotor = new TalonFX(RobotMap.mapHopper.HOPPER_MOTOR);
HopperSensor = new DigitalInput(RobotMap.mapHopper.GAME_PIECE_HOPPER_DIO);

}

public void setHopperMotorSpeed(double speed) {
HopperMotor.set(speed);
}

public void setHopperMotorNuetralOutput() {
HopperMotor.set(0);
}

@Override
public void periodic() {

}
}

0 comments on commit c2def65

Please sign in to comment.