Skip to content

Stage 1A Starter Code + Solution (CTRE / WPILib 2026)#8

Open
DylanB5402 wants to merge 16 commits into
frcsoftware:mainfrom
DylanB5402:stage-1-starter-code
Open

Stage 1A Starter Code + Solution (CTRE / WPILib 2026)#8
DylanB5402 wants to merge 16 commits into
frcsoftware:mainfrom
DylanB5402:stage-1-starter-code

Conversation

@DylanB5402
Copy link
Copy Markdown
Collaborator

@DylanB5402 DylanB5402 commented Apr 18, 2026

For #11

First pass at Starter Code + Solutions for Stage 1A (Kitbot, no commands)

The bulk of this PR is all the cruft that comes with a robot project - I've left comments on the interesting parts. Starter Code is just the solution code with everything in Robot.java stripped out. Commented out references to sim utilities have been left in for convenience.

Leave comments on the Starter Code / Solutions as needed - I've written them in the style of how I'd write this sorta thing for use with my own students, conventions here may not match up 100% with what FRCSoftware should promote, and we can change as needed.

Decided to leave Stage 1B (Kitbot + Commands) Solutions for later, this PR was getting chonky enough.

Also includes AdvantageScope+ SimGUI layouts.

Testing instructions:

  1. Open the solution code in your local VSCode and run sim
  2. Enable in auto, should drive forward for 3 seconds
  3. Enable in teleop
    a. WASD should drive
    b. Q and E should control the shooter and intake motors: refer to their respective AScope topics to make sure they're actually running

@DylanB5402 DylanB5402 linked an issue May 10, 2026 that may be closed by this pull request
@DylanB5402 DylanB5402 changed the title Generate starter code for stage1 Stage 1 Starter Code (CTRE / WPILib 2026) May 10, 2026
@DylanB5402 DylanB5402 changed the title Stage 1 Starter Code (CTRE / WPILib 2026) Stage 1A Starter Code + Solution (CTRE / WPILib 2026) May 16, 2026
// 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;
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solution code for Stage 1A

import edu.wpi.first.wpilibj.RobotController;
import edu.wpi.first.wpilibj.simulation.DifferentialDrivetrainSim;

public class DrivetrainSim {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drivetrain Sim - shared between starter code and template

import edu.wpi.first.wpilibj.RobotController;
import edu.wpi.first.wpilibj.simulation.FlywheelSim;

public class SingleFlywheelSim {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sim for a single flywheel, used for the kitbot intake + shooter

* the package after creating this project, you must also update the build.gradle file in the
* project.
*/
public class Robot extends TimedRobot {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starter Code for Stage 1A

@DylanB5402 DylanB5402 marked this pull request as ready for review May 16, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stage 1 Starter Code (CTRE)

1 participant