Usage of ADC interrupt and the inner temperature sensor

Dependencies:   mbed-rtos mbed

Fork of rtos_basic by mbed official

Revision:
7:84b7291a746d
Parent:
3:c92e21f305d8
Child:
8:4d2d1dbbeda5
--- a/main.cpp	Tue Jun 04 16:01:32 2013 +0100
+++ b/main.cpp	Thu Jan 28 15:24:41 2016 +0000
@@ -1,21 +1,38 @@
+/** 09_rtos_basic
+ * RTOS LED blinking example running 3 threads
+ * (main and two additional threads)
+ *
+ * Hardware requirement:
+ *  - FRDM-KL25Z board
+ */
+
 #include "mbed.h"
 #include "rtos.h"
  
 DigitalOut led1(LED1);
 DigitalOut led2(LED2);
+DigitalOut led3(LED3);
  
 void led2_thread(void const *args) {
     while (true) {
         led2 = !led2;
-        Thread::wait(1000);
+        Thread::wait(2000);
+    }
+}
+
+void led3_thread(void const *args) {
+    while (true) {
+        led3 = !led3;
+        Thread::wait(4000);
     }
 }
  
 int main() {
-    Thread thread(led2_thread);
-    
+    Thread thread2(led2_thread);
+    Thread thread3(led3_thread);
+        
     while (true) {
         led1 = !led1;
-        Thread::wait(500);
+        Thread::wait(1000);
     }
 }