Skip to content

Intake Subsytem Code

Lizzy7403 edited this page Jan 16, 2024 · 1 revision

Intake Subsystem Guide (Intake.java) Purpose: The Intake subsystem is responsible for controlling the intake mechanism of the robot. It handles the spinning of the intake roller and the rotation of the intake assembly for extending or retracting the intake.

Key Components: Spin Motor: Controls the intake roller for gathering objects. Rotate Motor: Adjusts the position of the intake assembly, typically for extending or retracting the intake mechanism. (Arm)

Key Methods: spinIntake(double speed): This method sets the speed of the intake roller. A positive value spins the roller to intake objects, and a negative value can be used to eject objects. speed: The speed at which the intake roller spins. Range: -1.0 to 1.0.

rotateIntake(double setpoint): Rotates the intake assembly to a specific position using PID control. setpoint: The target position for the intake rotation.

stopRotateIntake(): Stops the rotation of the intake assembly.

getRotateEncoderPosition(): Returns the current position of the intake assembly as reported by the encoder.

resetRotateEncoder(): Resets the encoder position to zero. Useful for recalibration or at the start of a match.

also displayed position and velocity to smartdashboard

Clone this wiki locally