Class used to interface with the handheld gamepad.
Fork of Gamepad by
Diff: Gamepad.h
- Revision:
- 17:cf1e1ffcf773
- Parent:
- 16:3ea3d9714b0c
- Child:
- 18:e0a4f15a7750
diff -r 3ea3d9714b0c -r cf1e1ffcf773 Gamepad.h --- a/Gamepad.h Fri Mar 03 13:19:19 2017 +0000 +++ b/Gamepad.h Sun Mar 05 19:01:31 2017 +0000 @@ -45,6 +45,7 @@ /** Gamepad Class @brief Library for interfacing with ELEC2645 Gamepad PCB, University of Leeds @author Dr Craig A. Evans +@author Dr Alex Valanvanis @date Febraury 2017 */ class Gamepad @@ -120,34 +121,10 @@ void leds(float val) const; /** Set LED to duty-cycle - *@param value in range 0.0 to 1.0 - */ - void led1(float val); - - /** Set LED to duty-cycle - *@param value in range 0.0 to 1.0 - */ - void led2(float val); - - /** Set LED to duty-cycle + *@param led number (0 to 5) *@param value in range 0.0 to 1.0 */ - void led3(float val); - - /** Set LED to duty-cycle - *@param value in range 0.0 to 1.0 - */ - void led4(float val); - - /** Set LED to duty-cycle - *@param value in range 0.0 to 1.0 - */ - void led5(float val); - - /** Set LED to duty-cycle - *@param value in range 0.0 to 1.0 - */ - void led6(float val); + void led(int n,float val); /** Read potentiometer *@returns potentiometer value in range 0.0 to 1.0