test

Dependencies:   mbed-os mbed

Revision:
0:2d562b246a88
Child:
1:3dc76cd598b0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Oct 02 09:37:14 2018 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+ 
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+Thread thread;
+ 
+void led2_thread() {
+    while (true) {
+        led2 = !led2;
+        wait(1);
+    }
+}
+ 
+int main() {
+    thread.start(led2_thread);
+    
+    while (true) {
+        led1 = !led1;
+        wait(0.5);
+    }
+}
+