upm
1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
|
API for the ElecFreaks* Joystick v 1.2-1.4 Breakout. More...
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.
Public Member Functions | |
Joystick12 (int pinX, int pinY) | |
~Joystick12 () | |
float | getXInput () |
float | getYInput () |
Joystick12 | ( | int | pinX, |
int | pinY | ||
) |
Instantiates a Joystick object
pinX | Analog pin where the X input is connected |
pinY | Analog pin where the Y input is connected |
~Joystick12 | ( | ) |
Joystick object destructor
float getXInput | ( | ) |
Gets the X input
float getYInput | ( | ) |
Gets the Y input