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.
Diff: Gamepad.h
- Revision:
- 0:a6288c29b936
- Child:
- 1:6d25cd49059b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Gamepad.h Sat Feb 04 15:31:44 2017 +0000
@@ -0,0 +1,44 @@
+#ifndef GAMEPAD_H
+#define GAMEPAD_H
+
+#include "mbed.h"
+#include "N5110.h"
+#include "Joystick.h"
+
+class Gamepad
+{
+
+public:
+
+ Gamepad();
+ N5110 *lcd;
+ Joystick *joystick;
+
+ void init();
+ void leds_on();
+ void leds_off();
+
+private:
+
+ PwmOut *led_1;
+ PwmOut *led_2;
+ PwmOut *led_3;
+ PwmOut *led_4;
+ PwmOut *led_5;
+ PwmOut *led_6;
+
+ InterruptIn *button_A(PTB9);
+ InterruptIn *button_B(D10);
+ InterruptIn *button_X(PTC17);
+ InterruptIn *button_Y(PTC12); // changed pin
+ InterruptIn *button_back(PTB19);
+ InterruptIn *button_start(PTC5);
+ InterruptIn *button_L(PTB18);
+ InterruptIn *button_R(PTB3);
+
+ PwmOut *buzzer(PTC10);
+ AnalogIn *pot(PTB2);
+
+};
+
+#endif
\ No newline at end of file