HEPTA-Sat Training 2022 / Mbed 2 deprecated Lab1-02_binary_count

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
MEXT1
Date:
Thu Jul 02 08:45:58 2020 +0000
Commit message:
Lab1-02_Binary_Count

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 5df38873a410 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Jul 02 08:45:58 2020 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+
+DigitalOut myleds[] = {LED1,LED2,LED3,LED4};
+
+void funcmyleds(bool arg0, bool arg1, bool arg2, bool arg3){
+    myleds[0] = arg0;
+    myleds[1] = arg1;
+    myleds[2] = arg2;
+    myleds[3] = arg3;
+}
+int main() {
+    for(int i=15;i>0;i--){
+        funcmyleds(i&8,i&4,i&2,i&1);
+        wait(1.0);
+    }
+    for(bool on=false;;on=!on ){
+        funcmyleds(on,on,on,on);
+        wait(0.2);
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 5df38873a410 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Jul 02 08:45:58 2020 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file