Skip to content

Curriculum challenge ~ Auto stopping Collector

Alex Schokking edited this page Nov 9, 2024 · 4 revisions

The 2023 robot had a collector to suck in inflatable cubes. But once the collector had a cube it needed to stop intaking so hard or it would pop the cube.

You're going to implement this feature from scratch yourself in this challenge.

The collector is a motor that you can set the power of just like you've been doing for the drive motors this whole time.

Your first step is to implement a basic Subsystem and Commands for this collector mechanism that can run the motors forwards and backwards.

From there, you'll add in the ability to detect that a cube has been intaked and the motor should stop trying so hard.

Creating a new robot project from our template

First create a new git repository using our template as a base: https://github.com/new?template_name=FRCRobotTemplate&template_owner=Team488

Give the repository a name like "My2023Robot"

Then clone this repository locally

Create a new Subsystem for the Collector

Create a new java class CollectorSubsystem that inherits from BaseSubsystem.

It should have a XCANSparkMax motor inside of it that you can make go forward, backwards or stop with functions.

Create intake, outake and stop Commands

Test what you've done so far on the 2023 robot

Update intake logic so it doesn't pop cubes

Clone this wiki locally