First New

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
aafanasj
Date:
Fri Jan 19 23:52:56 2018 +0000
Child:
1:fccb9a602d9a
Commit message:
Initial cmt

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	Fri Jan 19 23:52:56 2018 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+DigitalOut led3(LED3);
+
+// main() runs in its own thread in the OS
+int main() {
+    while (true) {
+        led1.write(1);
+        led2.write(0);
+        led3.write(0);
+        wait(0.5);
+
+        led1.write(0);
+        led2.write(1);
+        led3.write(0);
+        wait(0.5);
+
+        led1.write(0);
+        led2.write(0);
+        led3.write(1);
+        wait(0.5);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jan 19 23:52:56 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/7130f322cb7e
\ No newline at end of file