Package frc.robot.subsystems
Class Intake
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
frc.robot.subsystems.Intake
- All Implemented Interfaces:
edu.wpi.first.wpilibj.Sendable,edu.wpi.first.wpilibj2.command.Subsystem
public class Intake
extends edu.wpi.first.wpilibj2.command.SubsystemBase
The intake. Includes intake motors and pistons for intake extension.
-
Field Summary
Fields Modifier and Type Field Description edu.wpi.first.wpilibj.DigitalInputintakeBeamBreakedu.wpi.first.wpilibj.DoubleSolenoidintakeExtensioncom.ctre.phoenix.motorcontrol.can.WPI_TalonSRXintakeMotor -
Constructor Summary
Constructors Constructor Description Intake() -
Method Summary
Modifier and Type Method Description booleangetCellEntered()voidintakeExtend()Extends the intake (intake down).voidintakeRetract()Retracts the intake (intake up).voidsetIntakeMotors(double power)Spins intake motors.voidstopIntakeMotors()Stops intake motors.Methods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase
addChild, getName, getSubsystem, initSendable, setName, setSubsystem
-
Field Details
-
intakeMotor
public com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX intakeMotor -
intakeExtension
public edu.wpi.first.wpilibj.DoubleSolenoid intakeExtension -
intakeBeamBreak
public edu.wpi.first.wpilibj.DigitalInput intakeBeamBreak
-
-
Constructor Details
-
Intake
public Intake()
-
-
Method Details
-
setIntakeMotors
public void setIntakeMotors(double power)Spins intake motors.- Parameters:
power- The power at which the intake motors are set [-1 to 1].
-
stopIntakeMotors
public void stopIntakeMotors()Stops intake motors. -
intakeExtend
public void intakeExtend()Extends the intake (intake down). -
intakeRetract
public void intakeRetract()Retracts the intake (intake up). -
getCellEntered
public boolean getCellEntered()- Returns:
- Whether the intake beam break currently detects something.
-