Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of SparkfunAnalogJoystick by
SparkfunAnalogJoystick Class Reference
Joystick class. More...
#include <SparkfunAnalogJoystick.h>
Public Member Functions | |
| SparkfunAnalogJoystick (PinName, PinName, PinName) | |
| Constructor of Joystick object. | |
| int | button () |
| Get the button status. | |
| float | xAxis () |
| X axis value, reverse the value to get the x value in a normal Cartesian coordinate system. | |
| float | yAxis () |
| Y axis value. | |
| float | angle () |
| Calculate the angle value in a polar coordinate system. | |
| float | distance () |
| Calculate the normalized distance value in a polar coordinate system. | |
Detailed Description
Joystick class.
User Interface to use Sparkfun Joystick Module
Definition at line 15 of file SparkfunAnalogJoystick.h.
Constructor & Destructor Documentation
| SparkfunAnalogJoystick | ( | PinName | vert, |
| PinName | horz, | ||
| PinName | sel | ||
| ) |
Constructor of Joystick object.
Definition at line 14 of file SparkfunAnalogJoystick.cpp.
Member Function Documentation
| float angle | ( | ) |
Calculate the angle value in a polar coordinate system.
Definition at line 35 of file SparkfunAnalogJoystick.cpp.
| int button | ( | ) |
Get the button status.
Definition at line 20 of file SparkfunAnalogJoystick.cpp.
| float distance | ( | ) |
Calculate the normalized distance value in a polar coordinate system.
Definition at line 50 of file SparkfunAnalogJoystick.cpp.
| float xAxis | ( | ) |
X axis value, reverse the value to get the x value in a normal Cartesian coordinate system.
Definition at line 25 of file SparkfunAnalogJoystick.cpp.
| float yAxis | ( | ) |
Y axis value.
Definition at line 30 of file SparkfunAnalogJoystick.cpp.
Generated on Tue Jul 12 2022 18:33:56 by
1.7.2
