FTC Single Button Actions
Use the SAME code for repeated actions between your TeleOp and Autonomous.
What is it?
FTC Single Button Actions (SBA's) is a framework designed to execute several tasks on your robot sequentially, with minimal code complexity.
SBA's helped us, FTC Bruinbots #13599, to win 1st place Control Award twice in a row in the 2024-2025 Into the Deep season.
How does it work?
FTC SBA's work by breaking down complex motion sequences into frozen snapshots, called frames. Think of this like a stop-motion recording of your robot, except intead of being stuck on a screen, this recording can happen in reality.
First, you break your sequence down into steps. For example, to pick up something from the ground with a claw, you'll need to:
- Open claw
- Lower arm
- Close claw
- Lift arm
These can be represented as motor and servo movements (positions are for illustration purposes only):
- Move
clawServo
to position1
- Move
armMotor
to position500
- Move
clawServo
to position0.5
- Move
armMotor
to position1000
These can then be translated into SBA's (more on that later).
Now, to actually run these SBA's, the actions are simply played back, with each action waiting for the previous one to finish before starting itself.
Installation
- Download this repository as a zip.
- Extract the zip file to a folder.
- Copy the
SBAs
andUtils
folder to yourTeamCode
folder.