Before our program begins, we need to do some set up first as part of initialization. This section of code will run when "Init" is pressed on the Driver Hub and before "Play" is pressed!

The motors on the drivetrain are mirrored with each other. If we set them to run the same direction then the robot will only spin in a circle! Instead, we will set the left motor to run in reverse allowing us to drive normally.
As for the motors used for the flywheel, because we plan to use velocity we need the encoders enabled to receive proper measurements.

We will be using velocity for the flywheel motors. We can create a variable for our target velocity to make it easy to make adjustments later if we increase or decrease the target.

Velocity is measured in ticks per second.
The FGC Starter Bot is designed for arcade drive. The left joystick controls all movement for the robot's drivetrain, forward/back and turning!
The inputs from the joystick will be stored in the set up X and Y variables. However, unlike the targetVelocity constant variable set up during initialization, these variables will update every time the program loops.
Then these variables are used to calculate how much power to give each motor based on the current movement of the joystick.
The FGC Starter Bot uses a single motor for climbing. On the gamepad, pressing triangle will allow the robot to ascend up the brace while square reverses the motor to aid with adjusting while climbing.


If your team is new to FIRST Global Challenge, or in need of a review, we strongly recommend checking out our updated Hello Robot Programming Guide before diving in!
To begin, let's take a look at the configuration and actuators used in this year's design.
REV Robotics Ultraplanetary HD Hex Motor
Expansion Hub
0
Before getting started with programming, we needed to create a . Below is an overview of how the robot is configured for the TeleOp code to function as expected:
Right click the file below and select "save link as" if the download button does not appear. To put this configuration file on your robot, drag this file into the "FIRST" folder of your Control Hub's file system.
The 2026 FGC Starter Bot uses arcade drive controlled by the left joystick. The robot's forward and reverse motions, along with turning, are all controlled by the left stick together!
More information on programming gamepads for use with your robot can be found at .
The intake is controlled using the bumpers on the gamepad. The left bumper intakes game pieces into the robot while right bumper reverses to output back onto the field.
The flywheel on the Starter Bot is controlled using two motors. These motors need to move at the same time when activated.
When cross is pressed, the flywheels will both spin up to the set target velocity. Then the Core Hex controlling the feeder will wait until both motors are within 100 ticks of the target velocity before activating and feeding game pieces into the flywheel to launch.
The Core Hex motor controlling the feeder into the flywheel can be manually controlled using the Dpad on the gamepad to assist with agitating game pieces and clearing jams.
If the robot is not receiving input from the Dpad or Cross button, then all three motors will return to 0 power.
To aid with fine tuning the flywheels, we can add telemetry to see the current velocity on the Driver Hub. The velocity can be changed by modifying the targetVelocity
rightDrive
REV Robotics Ultraplanetary HD Hex Motor
Expansion Hub
1
leftDrive
REV Robotics Ultraplanetary HD Hex Motor
Expansion Hub
2
climbMotor
REV Robotics Ultraplanetary HD Hex Motor
Control Hub
0
bottomFlywheel
REV Robotics Ultraplanetary HD Hex Motor
Control Hub
1
topFlywheel
REV Robotics Core Hex Motor
Control Hub
2
coreHex
REV Robotics Ultraplanetary HD Hex Motor
Control Hub
3
intakeMotor
Left Joystick
Arcade Drive (forward/back, turn)
Triangle
Climb Forward
Square
Climb Reverse
Cross
Activate Flywheel and Feeder
Left Bumper
Intake Game Pieces
Right Bumper
Outtake Game Pieces






