Mamecontroller/joystick device wrapper library

Dependencies:   USBDevice mbed

Revision:
0:4babde63a16e
Child:
2:018f204f6037
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Nov 26 23:24:53 2014 +0000
@@ -0,0 +1,33 @@
+#include "mbed.h"
+#include "USBKeyboard.h"
+#include "joystick.h"
+ 
+//LED1: NUM_LOCK
+//LED2: CAPS_LOCK
+//LED3: SCROLL_LOCK
+BusOut leds(LED1, LED2, LED3);
+ 
+//USBKeyboard
+USBKeyboard keyboard;
+
+//Serial uart(USBTX, USBRX);
+Serial uart(p28, p27); 
+SerialJoystick joy; 
+ 
+int main(void) {
+    uart.baud(57600);
+    uart.putc('A');
+    int k = 0 ;
+    while(k<3) {
+
+        //Printf is also completely supported
+        int i = 100;
+        float f = 0.5;
+        char h = 0x05;
+        uart.printf("i = %d, f = %f, h = %02X \r\n", i, f, h);
+        wait(3);
+        k++;
+    }
+    wait(2);
+    joy.init();
+}