Build upon MMA7660_HelloWorld to pull out x, y, z axes from device and print to LCD on mbed Application Board

Dependencies:   C12832_lcd MMA7660 mbed

Fork of MMA7660_HelloWorld by Erik -

Here reside bits and pieces of coding that is mostly derivative of the work of others. Mostly extensions and other modifications.

The proprioception board project.

Board design images follow.

/media/uploads/chapfohn/260px-sphere-and-ring_balance_board_underside.jpg /media/uploads/chapfohn/obroc2.gif

/media/uploads/chapfohn/coolboard-balance-board-ultimate-package-medium-bot02-03-w450.png

Files at this revision

API Documentation at this revision

Comitter:
Sissors
Date:
Wed Oct 17 16:40:45 2012 +0000
Child:
1:0a7a84edc8e5
Commit message:
Hello World 1.0

Changed in this revision

MMA7660.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/MMA7660.lib	Wed Oct 17 16:40:45 2012 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/Sissors/code/MMA7660/#a8e20db7901e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Oct 17 16:40:45 2012 +0000
@@ -0,0 +1,21 @@
+//Uses the measured z-acceleration to drive leds 2 and 3 of the mbed
+
+#include "mbed.h"
+#include "MMA7660.h"
+
+MMA7660 MMA(p28, p27);
+
+DigitalOut connectionLed(LED1);
+PwmOut Zaxis_p(LED2);
+PwmOut Zaxis_n(LED3);
+
+int main() {  
+    if (MMA.testConnection())
+        connectionLed = 1;
+        
+    while(1) {
+        Zaxis_p = MMA.z();
+        Zaxis_n = -MMA.z();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Oct 17 16:40:45 2012 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/cd19af002ccc
\ No newline at end of file