wpilib Package

wpilib functions

wpilib.ADXL345_I2C(self, port, range, …)

ADXL345 Accelerometer on I2C.

wpilib.ADXL345_SPI(self, port, range)

ADXL345 Accelerometer on SPI.

wpilib.ADXL362(*args, **kwargs)

ADXL362 SPI Accelerometer.

wpilib.ADXRS450_Gyro(*args, **kwargs)

Use a rate gyro to return the robots heading relative to a starting position.

wpilib.AddressableLED(self, port)

A class for driving addressable LEDs, such as WS2812s and NeoPixels.

wpilib.AnalogAccelerometer(*args, **kwargs)

Handle operation of an analog accelerometer.

wpilib.AnalogEncoder(self, analogInput)

Class for supporting continuous analog encoders, such as the US Digital MA3.

wpilib.AnalogGyro(*args, **kwargs)

Use a rate gyro to return the robots heading relative to a starting position.

wpilib.AnalogInput(self, channel)

Analog input class.

wpilib.AnalogOutput(self, channel)

MXP analog output class.

wpilib.AnalogPotentiometer(*args, **kwargs)

Class for reading analog potentiometers.

wpilib.AnalogTrigger(*args, **kwargs)

Overloaded function.

wpilib.AnalogTriggerOutput(self, trigger, …)

Class to represent a specific output from an analog trigger.

wpilib.AnalogTriggerType(self, value)


wpilib.BuiltInAccelerometer(self, range)

Built-in accelerometer.

wpilib.CAN(*args, **kwargs)

High level class for interfacing with CAN devices conforming to the standard CAN spec.




Provides a way to launch an out of process cscore-based camera service instance, for streaming or for image processing.

wpilib.Color(*args, **kwargs)

Represents colors that can be used with Addressable LEDs.

wpilib.Color8Bit(*args, **kwargs)

Represents colors that can be used with Addressable LEDs.

wpilib.Compressor(self, pcmID)

Class for operating a compressor connected to a %PCM (Pneumatic Control Module).

wpilib.Counter(*args, **kwargs)

Class for counting the number of ticks on a digital input channel.

wpilib.DMC60(self, channel)

Digilent DMC 60 Speed Controller.


Class to enable glitch filtering on a set of digital inputs.

wpilib.DigitalInput(self, channel)

Class to read a digital input.

wpilib.DigitalOutput(self, channel)

Class to write to digital outputs.


DigitalSource Interface.

wpilib.DoubleSolenoid(*args, **kwargs)

DoubleSolenoid class for running 2 channels of high voltage Digital Output (PCM).


Provide access to the network communication data to / from the Driver Station.

wpilib.DutyCycle(self, source)

Class to read a duty cycle PWM input.

wpilib.DutyCycleEncoder(*args, **kwargs)

Class for supporting duty cycle/PWM encoders, such as the US Digital MA3 with PWM Output, the CTRE Mag Encoder, the Rev Hex Encoder, and the AM Mag Encoder.

wpilib.Encoder(*args, **kwargs)

Class to read quad encoders.

wpilib.Error(*args, **kwargs)

Error object represents a library error.


Base class for most objects.


2D representation of game field for dashboards.


Game field object on a Field2d.


GyroBase is the common base class for Gyro implementations such as AnalogGyro.

wpilib.I2C(self, port, deviceAddress)

I2C bus interface class.



IterativeRobot implements the IterativeRobotBase robot program framework.

wpilib.IterativeRobotBase(self, period)

IterativeRobotBase implements a specific type of robot program framework, extending the RobotBase class.

wpilib.Jaguar(self, channel)

Luminary Micro / Vex Robotics Jaguar Speed Controller with PWM control.

wpilib.Joystick(self, port)

Handle input from standard Joysticks connected to the Driver Station.


The LiveWindow class is the public interface for putting sensors and actuators on the LiveWindow.


This base class runs a watchdog timer and calls the subclass’s StopMotor() function if the timeout expires.

wpilib.NidecBrushless(self, pwmChannel, …)

Nidec Brushless Motor.

wpilib.Notifier(self, handler, None])

Create a Notifier for timer event notification.

wpilib.PWM(self, channel)

Class implements the PWM generation in the FPGA.

wpilib.PWMSparkMax(self, channel)

REV Robotics SPARK MAX Speed Controller.

wpilib.PWMSpeedController(self, channel)

Common base class for all PWM Speed Controllers.

wpilib.PWMTalonFX(self, channel)

Cross the Road Electronics (CTRE) Talon FX Speed Controller with PWM control.

wpilib.PWMTalonSRX(self, channel)

Cross the Road Electronics (CTRE) Talon SRX Speed Controller with PWM control.

wpilib.PWMVenom(self, channel)

Playing with Fusion Venom Smart Motor with PWM control.

wpilib.PWMVictorSPX(self, channel)

Cross the Road Electronics (CTRE) Victor SPX Speed Controller with PWM control.

wpilib.PowerDistributionPanel(*args, **kwargs)

Class for getting voltage, current, temperature, power and energy from the CAN PDP.


The preferences class provides a relatively simple way to save important values to the roboRIO to access the next time the roboRIO is booted.

wpilib.Relay(self, channel, direction)

Class for Spike style relay outputs.


Implement a Robot Program framework.



wpilib.SD540(self, channel)

Mindsensors SD540 Speed Controller.

wpilib.SPI(self, port)

SPI bus interface class.


Interface for Sendable objects.





The SendableChooser class is a useful tool for presenting a selection of options to the SmartDashboard.


This class is a non-template base class for SendableChooser.


The SendableRegistry class is the public interface for registering sensors and actuators for use on dashboards and LiveWindow.


Stores most recent status information as well as containing utility functions for checking channels and error processing.

wpilib.SerialPort(*args, **kwargs)

Driver for the RS-232 serial port on the roboRIO.

wpilib.Servo(self, channel)

Standard hobby style servo.

wpilib.SlewRateLimiter(self, rateLimit, …)

A class that limits the rate of change of an input value.


wpilib.Solenoid(*args, **kwargs)

Solenoid class for running high voltage Digital Output (PCM).

wpilib.SolenoidBase(self, pcmID)

SolenoidBase class is the common base class for the Solenoid and DoubleSolenoid classes.

wpilib.Spark(self, channel)

REV Robotics SPARK Speed Controller.

wpilib.SpeedControllerGroup(self, *args)

wpilib.Talon(self, channel)

Cross the Road Electronics (CTRE) Talon and Talon SR Speed Controller.

wpilib.TimedRobot(self, period)

TimedRobot implements the IterativeRobotBase robot program framework.


A wrapper for the frc::Timer class that returns unit-typed values.


A class for keeping track of how much time it takes for different parts of code to execute.

wpilib.Ultrasonic(*args, **kwargs)

Ultrasonic rangefinder class.

wpilib.Victor(self, channel)

Vex Robotics Victor 888 Speed Controller.

wpilib.VictorSP(self, channel)

Vex Robotics Victor SP Speed Controller.

wpilib.Watchdog(self, timeout, callback, None])

A class that’s a wrapper around a watchdog timer.

wpilib.XboxController(self, port)

Handle input from Xbox 360 or Xbox One controllers connected to the Driver Station.