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.DigitalInput intakeBeamBreak  
    edu.wpi.first.wpilibj.DoubleSolenoid intakeExtension  
    com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX intakeMotor  
  • Constructor Summary

    Constructors 
    Constructor Description
    Intake()  
  • Method Summary

    Modifier and Type Method Description
    boolean getCellEntered()  
    void intakeExtend()
    Extends the intake (intake down).
    void intakeRetract()
    Retracts the intake (intake up).
    void setIntakeMotors​(double power)
    Spins intake motors.
    void stopIntakeMotors()
    Stops intake motors.

    Methods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase

    addChild, getName, getSubsystem, initSendable, setName, setSubsystem

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface edu.wpi.first.wpilibj.Sendable

    addChild, setName, setName, setName

    Methods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem

    getCurrentCommand, getDefaultCommand, periodic, register, setDefaultCommand, simulationPeriodic
  • 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

  • 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.