Mechanism

interface Mechanism

Represents a subsystem or mechanism on the robot (e.g., an arm, drivetrain, or intake).

Mechanisms encapsulate the hardware interactions and provide a centralized place to manage periodic updates and default commands within the command-based architecture.

Functions

Link copied to clipboard
open fun infinite(action: Runnable): Command

Creates a command that runs indefinitely and requires this mechanism.

Link copied to clipboard
open fun instant(action: Runnable): Command

Creates a command that runs once and requires this mechanism.

Link copied to clipboard
open fun periodic()

Called periodically during the OpMode loop. This is where you can update hardware reads, calculate state, or push telemetry.