JavaScript isn't enabled in your browser, so this file can't be opened. Enable and reload.
1 of 7
FRC Programming
FRC Java Basics
2 of 7
3 of 7
The structure
Command-Oriented Programming: Kind of like OOP but limited
Subsystems
Collection of functions and variables (classes) for each subsystem on the robot
E.g. drive, arm, collector, shooter have a subsystem each
Very barebone (practically an empty class)
Commands
4 specific functions (as defined on next slide)
Use subsystems to perform a task
E.g. “pick up from the floor”, “drive N meters”, “shoot piece” are individual commands
Have a lot of helper functions from WPILib
E.g. “terminate after N seconds”
4 of 7
The structure
Robot states
Disabled (different from turned off)
Autonomous
Teleop
Functions
Robot: init, periodic
Subsystems: constructor, periodic
Commands: constructor, init, periodic, end, isFinished
5 of 7
6 of 7
7 of 7