Stage 1A Starter Code + Solution (CTRE / WPILib 2026)#8
Open
DylanB5402 wants to merge 16 commits into
Open
Conversation
DylanB5402
commented
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; |
Collaborator
Author
There was a problem hiding this comment.
Solution code for Stage 1A
DylanB5402
commented
May 16, 2026
| import edu.wpi.first.wpilibj.RobotController; | ||
| import edu.wpi.first.wpilibj.simulation.DifferentialDrivetrainSim; | ||
|
|
||
| public class DrivetrainSim { |
Collaborator
Author
There was a problem hiding this comment.
Drivetrain Sim - shared between starter code and template
DylanB5402
commented
May 16, 2026
| import edu.wpi.first.wpilibj.RobotController; | ||
| import edu.wpi.first.wpilibj.simulation.FlywheelSim; | ||
|
|
||
| public class SingleFlywheelSim { |
Collaborator
Author
There was a problem hiding this comment.
Sim for a single flywheel, used for the kitbot intake + shooter
DylanB5402
commented
May 16, 2026
| * the package after creating this project, you must also update the build.gradle file in the | ||
| * project. | ||
| */ | ||
| public class Robot extends TimedRobot { |
Collaborator
Author
There was a problem hiding this comment.
Starter Code for Stage 1A
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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