Blink an internal and an external LED using a tilt sensor

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
faif
Date:
Sat Jan 07 20:33:43 2017 +0000
Commit message:
Blink an internal and an external LED using a tilt sensor

Changed in this revision

mbed.bld Show annotated file Show diff for this revision Revisions of this file
tilt.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 3ddb28605de4 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Jan 07 20:33:43 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/99b5ccf27215
\ No newline at end of file
diff -r 000000000000 -r 3ddb28605de4 tilt.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tilt.cpp	Sat Jan 07 20:33:43 2017 +0000
@@ -0,0 +1,13 @@
+#include "mbed.h"
+
+DigitalIn tilt(p20);
+DigitalOut externalLed(p18);
+DigitalOut led(LED4);
+
+int main () 
+{
+    while (true) 
+    {
+        externalLed = led = tilt;
+    }
+}