Arduino Universal Inputs
A collection of libraries for managing/processing input devices on Arduino.
|
Represents a joystick attached to an Arduino ADC pin. More...
#include <ArduinoJoystick.h>
Public Member Functions | |
ArduinoJoystick (inputid_t id, inputpin_t adc) | |
Creates a new joystick on an Arduino ADC. More... | |
![]() | |
IJoystick (inputid_t id) | |
Creates a new joystick. More... | |
inputtype_t | type () const |
Retrieves the type of this device. More... | |
bool | poll () |
Polls this input device for change. More... | |
inputanalog_t | getRawValue () const |
Gets last read raw value. More... | |
inputanalog_t | getCentredValue () const |
Gets the value centered at zero at the centre point and clamped if within the deadbands. More... | |
inputanalog_t | getValue () const |
Gets the transformed value. More... | |
void | setTransformation (IValueTransform *transform) |
Sets the transformation to use between the centred value and outout value. More... | |
bool | setThreshold (inputanalog_t threshold) |
Sets the minimum change in raw value that will fire an event. More... | |
inputanalog_t | getThreshold () const |
Returns the threshold value. More... | |
bool | setPoints (inputanalog_t low, inputanalog_t centre, inputanalog_t high) |
Sets the low, centre and high points. More... | |
bool | setPoints (inputanalog_t low, inputanalog_t high) |
Sets the low and high end points. More... | |
bool | setDeadbands (inputanalog_t low, inputanalog_t centre, inputanalog_t high) |
Sets the low, centre and high deadband widths. More... | |
bool | setDeadbands (inputanalog_t low, inputanalog_t high) |
Sets the low and high deadband widths. More... | |
inputanalog_t | getLowPoint () const |
Gets the low end point raw value. More... | |
inputanalog_t | getCentrePoint () const |
Gets the centre point raw value. More... | |
inputanalog_t | getHighPoint () const |
Gets the high end point raw value. More... | |
inputanalog_t | getLowDeadband () const |
Gets the deadband width at the low end point. More... | |
inputanalog_t | getCentreDeadband () const |
Gets the deadband width at the centre point. More... | |
inputanalog_t | getHighDeadband () const |
Gets the deadband width at the high end point. More... | |
![]() | |
IInputDevice (inputid_t id) | |
Creates a new input device. More... | |
inputid_t | getID () const |
Retrieves the ID of this device. More... | |
Protected Member Functions | |
inputanalog_t | getPhysicalValue () const |
Gets the raw value form the joystick. More... | |
Represents a joystick attached to an Arduino ADC pin.
ArduinoJoystick::ArduinoJoystick | ( | inputid_t | id, |
inputpin_t | adc | ||
) |
Creates a new joystick on an Arduino ADC.
id | ID of the joystick |
adc | ADC pin joystick is attached to |
|
protectedvirtual |