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

Committer:
muaiyd
Date:
Mon Apr 07 17:15:50 2014 +0000
Revision:
7:a92da438d06c
Parent:
1:b409ad65466a
Child:
8:6e55db96c11c
Finish  flash indicator lights

Who changed what in which revision?

UserRevisionLine numberNew contents of line
muaiyd 0:68ce46607848 1 #include "CAR.h"
muaiyd 1:b409ad65466a 2
muaiyd 0:68ce46607848 3 int main() {
muaiyd 0:68ce46607848 4 Port.write_bit(1,BL_BIT);
muaiyd 0:68ce46607848 5 CAR CAR1;
muaiyd 1:b409ad65466a 6 Thread Accelero_Brake_Thread(CAR1.Accelero_Brake_Read);
muaiyd 1:b409ad65466a 7 Thread Average_Speed_Measure_Thread(CAR1.Average_Speed_Measure);
muaiyd 1:b409ad65466a 8 Thread Average_Speed_Show_Thread(CAR1.Average_Speed_Show);
muaiyd 1:b409ad65466a 9 Thread OverSpeed_Thread(CAR1.OverSpeed);
muaiyd 7:a92da438d06c 10 Thread Odo_Show_Indicator_Switch_Read_Thread(CAR1.Odo_Show_Indicator_Switch_Read);
muaiyd 1:b409ad65466a 11 Thread SEND_CAR_VALUES_Thread(CAR1.SEND_CAR_VALUES);
muaiyd 1:b409ad65466a 12 Thread DUMP_CAR_VALUES_Thread(CAR1.DUMP_CAR_VALUES_En);
muaiyd 7:a92da438d06c 13 Thread Side_Light_Flash_Thread(CAR1.Side_Light_Flash);
muaiyd 1:b409ad65466a 14 while(1){
muaiyd 1:b409ad65466a 15 if(IsOverSpeed){
muaiyd 1:b409ad65466a 16 OverSpeedLED = 0x6;
muaiyd 1:b409ad65466a 17 wait(0.2);
muaiyd 1:b409ad65466a 18 OverSpeedLED = 0x9;
muaiyd 1:b409ad65466a 19 wait(0.2) ;
muaiyd 1:b409ad65466a 20 }
muaiyd 1:b409ad65466a 21 else{
muaiyd 1:b409ad65466a 22 OverSpeedLED = 0;
muaiyd 1:b409ad65466a 23 }
muaiyd 0:68ce46607848 24 }
muaiyd 0:68ce46607848 25 }