All pages
Powered by GitBook
1 of 1

Loading...

Programming - Drive and Climber

Arcade Drive

The FGC Starter Bot is designed for arcade drive. The left joystick controls all movement for the robot's drivetrain, forward/back and turning!

FGC Starter Bot Arcade Drive

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.

To learn more about the variables used and the equation for deciding motor power, check out the Hello Robot's walkthrough!

Climber Control

FGC Starter Bot Climb Code

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.