Shields / Mbed 2 deprecated mbed_Shield_LCD_Accelerometer

Dependencies:   C12832 MMA7660 mbed

Revision:
0:cc9d7d4dfb99
Child:
1:bad592d14bea
diff -r 000000000000 -r cc9d7d4dfb99 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Apr 01 16:27:40 2014 +0000
@@ -0,0 +1,32 @@
+#include "mbed.h"
+#include "C12832.h"
+#include "MMA7660.h"
+ 
+C12832 lcd(D11, D13, D12, D7, D10);
+MMA7660 MMA(D14, D15);
+
+int main()
+{
+    // clear the screen
+    lcd.cls();
+    
+    // print the first line and wait 3 sec
+    
+    lcd.locate(0,3);
+    
+    if (!MMA.testConnection()) {
+        lcd.printf("failed to initialize!");
+    } else {
+        lcd.printf("mbed application board!");
+    }
+    wait(3);
+ 
+    // print the counter prefix; the number will be printed in the while loop
+
+    int i=1;
+    while(i++) {
+        lcd.locate(0,15);
+        lcd.printf("%f, %f   ", MMA.x(), MMA.y());
+        wait(0.2);
+    }
+}
\ No newline at end of file