This is car control simulation by using Mbed controller and real time operating system.

Dependencies:   MCP23017 Servo WattBob_TextLCD mbed-rtos mbed

Fork of Ass3 by Muaiyd Al-Zandi

Revision:
2:707ab9d39a64
Parent:
1:b409ad65466a
Child:
3:4fb8cdf6ae01
--- a/CAR.cpp	Mon Apr 07 15:19:37 2014 +0000
+++ b/CAR.cpp	Mon Apr 07 15:31:38 2014 +0000
@@ -90,7 +90,7 @@
         mail_box.put(mail);
         printf("\n %i £ \n\r",Element_Counter_W);
         Element_Counter_W++;
-        Thread::wait(1000); 
+        Thread::wait(5000); 
         CAR_MAIL_SEM.release();             
     }
 }
@@ -98,10 +98,11 @@
     while (true) {
         L1 = L1 ^ 1;
         CAR_MAIL_SEM.wait();
-        while (Element_Counter_W > Element_Counter_R)
+        while (Element_Counter_W > Element_Counter_R){
             DUMP_CAR_VALUES();
+        }
         CAR_MAIL_SEM.release();
-        Thread::wait(5000);
+        Thread::wait(20000);
     }
 }
 void CAR::DUMP_CAR_VALUES () {