SharpAI
/

what does OpMode do

what does OpMode do

According to the official FTC Docs, an OpMode is a computer program you write to customize and control how your robot behaves during a match. The FTC SDK API defines OpMode as the base class for these programs, which displays on your driver station with a unique name so you can select and run it.

As explained in this lesson and Game Manual 0, when you use the standard OpMode class, the SDK handles the flow control and timing for you instead of you writing an outer control loop. It does this by calling specific lifecycle methods at precise moments: init() runs once when you press INIT, init_loop() runs repeatedly until you press START, start() runs once when you press START, loop() runs continuously to handle things like gamepad inputs until the match ends, and stop() runs once when you press STOP. This automatic looping makes it the ideal choice for TeleOp because it ensures your driver controls are constantly and reliably refreshed.

Was this right?

Generated from indexed documentation and can be wrong — check the source beside each claim. Follow-ups are not saved. Unofficial, not affiliated with FIRST. Quotes Game Manual 0 (CC BY-NC 4.0) and FTC Docs (BSD 3-Clause). Built by Sharp Face Robotics.