Eser 1

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
gianfalanga
Date:
Mon Oct 03 18:42:13 2016 +0000
Commit message:
Esercitazione 1

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 db13d12d2b12 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Oct 03 18:42:13 2016 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+
+
+
+DigitalOut myled(LED1);
+DigitalOut myled2(D8);
+DigitalIn b1(PC_13); 
+
+int main() {
+    while (1){
+        if(b1==1){
+            myled=1;
+            wait(0.02);
+            myled=0; 
+            wait(0.02);}
+        else{
+            myled=1;
+            wait(0.04);
+            myled=0; 
+            wait(0.04);}
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r db13d12d2b12 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Oct 03 18:42:13 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/25aea2a3f4e3
\ No newline at end of file