test cord of WiiClassicController

Dependencies:   WiiClassicController mbed

Revision:
0:3bcd6bc1d17e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Jun 16 03:41:29 2016 +0000
@@ -0,0 +1,23 @@
+/*
+It is test code for WiiClassicController /Pro.
+*/
+
+#include "mbed.h"
+#include "WiiClassicController.h"
+
+Serial pc(USBTX, USBRX);
+WiiClassicController wii(p9, p10); // SDA , SCL
+
+int main()
+{
+ while(1){
+        pc.printf("----------------\n");
+        pc.printf("LX:%d\tLY:%d\n", wii.joy_LX(), wii.joy_LY());
+        pc.printf("RX:%d\tRY:%d\n", wii.joy_RX(), wii.joy_RY());
+        pc.printf("home:%d\t-:%d\t+:%d\n", wii.button_home(), wii.button_minus(), wii.button_plus());
+        pc.printf("L:%d\tR:%d\tZL:%d\tZR:%d\n", wii.button_L(), wii.button_R(), wii.button_ZL(), wii.button_ZR());
+        pc.printf("A:%d\tB:%d\tX:%d\tY:%d\n", wii.button_A(), wii.button_B(), wii.button_X(), wii.button_Y()); 
+        pc.printf("DU:%d\tDD:%d\tDL:%d\tDR:%d\n", wii.button_DU(), wii.button_DD(), wii.button_DL(), wii.button_DR()); 
+        wait(1);
+     } 
+}   
\ No newline at end of file