tlacitko blika 5x

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Kroniiks
Date:
Thu Mar 17 10:46:47 2016 +0000
Commit message:
cudlik

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
diff -r 000000000000 -r 5006d9ec144d main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Mar 17 10:46:47 2016 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+
+
+DigitalOut myled(LED1) ;
+DigitalIn button(USER_BUTTON);
+
+int main() {
+   int prev_button = button;
+   while(1) {
+       int new_button = button;
+       if((prev_button !=0) && (new_button == 0)){
+           for(int i=0;i<5;i++) {
+            myled = 1;
+            wait(0.1);
+            myled = 0;
+            wait(0.3);
+        }
+        }
+        prev_button = new_button;
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 5006d9ec144d mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Mar 17 10:46:47 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/c0f6e94411f5
\ No newline at end of file