Example program for BLE devices using updated Puck library.

Dependencies:   Puck mbed

Fork of location-puck by Nordic Pucks

Files at this revision

API Documentation at this revision

Comitter:
cristea
Date:
Thu Jun 19 08:28:07 2014 +0000
Child:
1:345039810771
Commit message:
Initial commit

Changed in this revision

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/main.cpp	Thu Jun 19 08:28:07 2014 +0000
@@ -0,0 +1,43 @@
+#include <mbed.h>
+
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+
+void clear() {
+    led1 = 0;
+    led2 = 0; 
+}
+
+void cycle(float delta) {
+    clear();
+    led1 = 1;
+    wait(delta);
+    
+    clear();
+    led2 = 1;
+    wait(delta);
+    
+    clear();
+    led3 = 1;
+    wait(delta);
+    
+    clear();
+    led4 = 1;
+    wait(delta);
+}
+
+void drums(float delta) {
+    clear();
+    led1 = 1;
+    wait(delta);
+    
+    clear();
+    led4 = 1;
+    wait(delta);
+}
+
+int main() {
+    while(1) {
+        drums(0.3);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Jun 19 08:28:07 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/024bf7f99721
\ No newline at end of file