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.
Dependents: Lab4 4180final_receiver 4180final_sender DuelingTanks ... more
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 Thu Jul 14 2022 02:47:17 by
1.7.2
