final code

Dependencies:   C12832_lcd MMA7660 mbed

Files at this revision

API Documentation at this revision

Comitter:
elmh
Date:
Fri May 02 14:54:04 2014 +0000
Commit message:
Accelerometer final code

Changed in this revision

C12832_lcd.lib Show annotated file Show diff for this revision Revisions of this file
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/C12832_lcd.lib	Fri May 02 14:54:04 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/dreschpe/code/C12832_lcd/#8f86576007d6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MMA7660.lib	Fri May 02 14:54:04 2014 +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	Fri May 02 14:54:04 2014 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h" 
+#include "MMA7660.h" // Accelerometer library 
+MMA7660 MMA(p28, p27); // Accelerometer connections 
+Serial pc(USBTX, USBRX); // tx, rx for PuTTy 
+float ax, ay, az; // acceleration values 
+DigitalOut connectionLed(LED1); 
+int main() { 
+ if (MMA.testConnection()) 
+ connectionLed = 1; // check that MMA is connected and display on LED1 
+ while(1) { 
+ ax=MMA.x(); // read accelerometer values 
+ ay=MMA.y(); 
+ az=MMA.z(); 
+ wait(0.5);
+ pc.printf("values are %f,%f,%f\n",ax,ay,az); 
+ pc.printf("\n"); 
+ } 
+} 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri May 02 14:54:04 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/8a40adfe8776
\ No newline at end of file