pyupm_joystick12 module

class pyupm_joystick12.Joystick12(pinX, pinY)[source]

Bases: object

API for the ElecFreaks* Joystick v 1.2-1.4 Breakout.

ID: joystick12

Name: 2-axis Analog Joystick

Category: ainput

Manufacturer: generic

Connection: analog

Kit: robok This module defines the Joystick API, and implementation for the X and Y buttons could be treated as normal GPIO - this enables easier interrupt support. This driver should be compatible with any 2-axis analog joystick.

C++ includes: joystick12.hpp

getXInput()[source]

float getXInput()

Gets the X input float X value, ranging from -1 to 1; 0 is mid

getYInput()[source]

float getYInput()

Gets the Y input

float Y value, ranging from -1 to 1; 0 is mid