Wii Nunchuk via RFM69HW to Duplo 9203 Remote Control Car Kit using ARM mbed on a FRDM-KL25Z

Dependencies:   CRC FastPWM RFM69 USBDevice WakeUp WiiChuk_compat mbed-rtos mbed tlc59108

Fork of wiiNunchuk_compat by Greg Brush

Files at this revision

API Documentation at this revision

Comitter:
gbrush
Date:
Mon Mar 14 23:48:15 2011 +0000
Child:
1:de8c34c9ccdf
Commit message:
Initial

Changed in this revision

WiiChuk_compat.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/WiiChuk_compat.lib	Mon Mar 14 23:48:15 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/gbrush/code/WiiChuk_compat/#e84a5ccbac19
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Mar 14 23:48:15 2011 +0000
@@ -0,0 +1,31 @@
+#include "mbed.h"
+
+#include "WiiChuk_compat.h"
+
+WiiChuck WiiNun(p9, p10);
+Serial pc(USBTX, USBRX);
+
+int main() {
+
+
+         pc.baud(115200);
+         pc.printf("wii test begin                                             \r\n");
+
+         int joyX = 0;int joyY = 0;
+         int accX = 0;int accY = 0;int accZ = 0;
+         int buttonC = 0;int buttonZ = 0;
+     
+      while(1) {
+         bool read = WiiNun.Read(&joyX,&joyY,&accX,&accY,&accZ,&buttonC,&buttonZ);
+         if(read)
+         {
+             pc.printf("x%3d y%3d c%1d z%1d --", joyX, joyY, buttonC, buttonZ);
+             pc.printf("x%d y%d z%d                    \r", accX, accY, accZ);
+         }
+         else
+         {
+             pc.printf("Error\n");
+         }
+         wait(0.001);
+     }
+ }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Mar 14 23:48:15 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912