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.

Constructor for RobotIterativeBase.

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.

logger = <logging.Logger object>

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().