IterativeRobot

class wpilib.IterativeRobot[source]

Bases: wpilib.IterativeRobotBase

IterativeRobot implements the IterativeRobotBase robot program framework.

The IterativeRobot class is intended to be subclassed by a user creating a robot program.

periodic() functions from the base class are called each time a new packet is received from the driver station.

Deprecated since version 2019.0.0: Use TimedRobot instead. It’s a drop-in replacement that provides more regular execution periods.

Constructor for IterativeRobot.

The constructor initializes the instance variables for the robot to indicate the status of initialization for disabled, autonomous, and teleop code.

Warning

If you override __init__ in your robot class, you must call the base class constructor. This must be used to ensure that the communications code starts.

kPacketPeriod = 0.02
logger = <Logger robot (WARNING)>

A python logging object that you can use to send messages to the log. It is recommended to use this instead of print statements.

startCompetition()[source]

Provide an alternate “main loop” via startCompetition().

Return type:None