the complete model of the heart model

Dependencies:   TextLCD mbed-rtos mbed

Fork of heart by William Archer

Revision:
3:5941bb3c4fc2
Parent:
2:b4551e56cd1c
Child:
4:453a2f967f52
--- a/main.cpp	Wed Nov 30 03:45:47 2016 +0000
+++ b/main.cpp	Wed Nov 30 04:16:42 2016 +0000
@@ -158,16 +158,32 @@
     }
 }
 
-void Random(){
-    //TODO: heart behaviour in random mode
+//The following two modules random_sensing and random_pacing are two components of the random mode.
+void random_sensing(){
     while(1){
         if(mode == 0){
             performModeDelay();
-            //natApaceBlink();
-        }
+        }    
+    }
+}
+
+void random_pacing(){
+    while(1){
+        if(mode == 0){
+            performModeDelay();
+        }    
     }
 }
 
+
+//Heart Modes: Random, Manual, Test
+void Random(){
+    //TODO: heart behaviour in random mode
+    Thread s(random_sensing);
+    Thread p(random_pacing);
+    while(1);
+}
+
 void Manual(){
     //TODO: heart behaviour in manual mode
     while(1){