Using on board MMA8451Q on FRK25

Dependencies:   MMA8451Q mbed

Revision:
0:5e8c7a36cb58
Child:
1:bbb4d2753b6b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Oct 12 13:03:56 2012 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+
+Ticker tick;
+DigitalOut led1(LED_RED);
+DigitalOut led2(LED_GREEN);
+
+void flip()
+{
+    led2 = !led2;
+}
+
+int main()
+{
+    tick.attach(&flip, 0.7); // setup ticker to call flip led2 after 0.7 seconds
+
+    // spin in a main loop.
+    while(1) {
+        led1 = !led1;
+        wait (0.3); // flip led1 every 0.3 seconds
+    }
+}
\ No newline at end of file