JoystickButton

class wpilib.buttons.JoystickButton(joystick, buttonNumber)[source]

Bases: wpilib.buttons.Button

Create a joystick button for triggering commands.

Parameters:
  • joystick – The GenericHID object that has the button (e.g. Joystick, KinectStick, etc)
  • buttonNumber – The button number (see GenericHID.getRawButton())
get()[source]

Gets the value of the joystick button.

Returns:The value of the joystick button