Daiki Kato / Mbed OS blinky-for-lychee

Files at this revision

API Documentation at this revision

Comitter:
dkato
Date:
Tue Sep 26 06:15:01 2017 +0000
Commit message:
first commit

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib 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	Tue Sep 26 06:15:01 2017 +0000
@@ -0,0 +1,31 @@
+
+#include "mbed.h"
+
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+DigitalOut led3(LED3);
+DigitalOut led4(LED4);
+
+int main() {
+    printf("blinky-for-lychee\r\n");
+
+    while(1) {
+        led1 = 1;
+        wait(0.2);
+        led2 = 1;
+        wait(0.2);
+        led3 = 1;
+        wait(0.2);
+        led4 = 1;
+        wait(0.2);
+        led1 = 0;
+        wait(0.2);
+        led2 = 0;
+        wait(0.2);
+        led3 = 0;
+        wait(0.2);
+        led4 = 0;
+        wait(0.2);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Tue Sep 26 06:15:01 2017 +0000
@@ -0,0 +1,1 @@
+https://github.com/TomoYamanaka/mbed/#16fbdd4e613ca998d27ecf8fae3b79c5e60fe186