test

Dependencies:   mbed mbed-rtos

Files at this revision

API Documentation at this revision

Comitter:
Oleg_B
Date:
Fri Jan 11 13:01:28 2019 +0000
Commit message:
test;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib 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 11 13:01:28 2019 +0000
@@ -0,0 +1,44 @@
+#include "mbed.h"
+#include "rtos.h"
+
+LocalFileSystem local("local"); 
+
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+DigitalOut led3(LED3);
+DigitalOut led4(LED4);
+
+
+Thread thread;
+
+void led_thread()
+{
+    while (true) {
+        led4 = !led4;
+        wait(0.1);
+    }
+}
+
+int main() {
+    
+    thread.start(led_thread);
+    
+    while(1) {
+        led1 = 1;
+        wait(0.5);
+        
+        led2 = 1;
+        FILE *fp = fopen("/local/setup.txt", "r"); 
+        wait(0.5);
+        
+        led3 = 1;
+        fclose(fp);
+        wait(0.5);
+        
+        led1=0;
+        led2=0;
+        led3=0;
+        
+        wait(1);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-rtos.lib	Fri Jan 11 13:01:28 2019 +0000
@@ -0,0 +1,1 @@
+http://os.mbed.com/users/mbed_official/code/mbed-rtos/#5713cbbdb706
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jan 11 13:01:28 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/3a7713b1edbc
\ No newline at end of file