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:
13:e5b22bfbe67b
Parent:
11:7f2414ecb7ee
diff -r 8eb2c1cccee6 -r e5b22bfbe67b CommonVariable.h
--- a/CommonVariable.h	Tue May 06 09:49:08 2014 +0000
+++ b/CommonVariable.h	Wed May 07 10:25:50 2014 +0000
@@ -1,3 +1,6 @@
+/***********************************
+*       CommonVariable.h           *
+************************************/
 #ifndef COMMON_VARIABLE_H
 #define COMMON_VARIABLE_H
 #include "MCP23017.h"
@@ -8,29 +11,34 @@
 static Servo SpeedShow_Servo(p21); // Use pin 21 to control the servo
 static MCP23017 Port(p9,p10,0x40) ;      // 16-bit object with I2C Chip MCP23017 
 static WattBob_TextLCD LCD(&Port);       // A 2*16 chacater LCD object
+//Input and Output ports
 static BusOut OverSpeedLED(LED1 , LED2 , LED3 , LED4);
 static DigitalIn EngineSwitch(p5);
 static DigitalOut R_Side_Light(p27);
 static DigitalOut L_Side_Light(p28);
 static DigitalOut R_Side_Indicator(p29);
 static DigitalOut L_Side_Indicator(p30);
-static DigitalIn LSide_Light_Switch(p6);
-static DigitalIn RSide_Light_Switch(p7);
-static DigitalIn LSide_Indicator_Switch(p15);
-static DigitalIn RSide_Indicator_Switch(p16);
+static DigitalIn L_Light_Switch(p6);
+static DigitalIn R_Light_Switch(p7);
+static DigitalIn L_Indicator_Switch(p15);
+static DigitalIn R_Indicator_Switch(p16);
 static AnalogIn Accelerometer(p19);
 static AnalogIn Brake(p20);
 
 extern const uint8_t MaxSpeed;
-
+//Inpout Data Variable
 extern bool EngineStat;
 extern bool IsOverSpeed;
+extern bool R_LightSide_SW;
+extern bool L_LightSide_SW;
+extern bool R_Indicator_SW;
+extern bool L_Indicator_SW;
 extern float Accelerometer_Value;
 extern float Brake_Value;
+
 extern uint8_t Speed[3];
 extern uint8_t Average_Speed;
 extern float Odometer_Value;
 extern uint8_t Counter;
 
-
 #endif
\ No newline at end of file