wpilib.TimedRobot, period: seconds = 0.02) → None¶
TimedRobot implements the IterativeRobotBase robot program framework.
The TimedRobot class is intended to be subclassed by a user creating a robot program.
Periodic() functions from the base class are called on an interval by a Notifier instance.
Constructor for TimedRobot.
period – Period.
wpilib.TimedRobot, callback: Callable, None], period: seconds, offset: seconds = 0.0) → None¶
Add a callback to run at a specific period with a starting time offset.
This is scheduled on TimedRobot’s Notifier, so TimedRobot and the callback run synchronously. Interactions between them are thread-safe.
callback – The callback to run.
period – The period at which to run the callback.
offset – The offset from the common starting time. This is useful for scheduling a callback in a different timeslot relative to TimedRobot.
wpilib.TimedRobot) → seconds¶
Get the time period between calls to Periodic() functions.