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 15:19:37 2014 +0000
Revision:
1:b409ad65466a
Parent:
0:68ce46607848
Child:
7:a92da438d06c
Finish the semefor with mail

Who changed what in which revision?

UserRevisionLine numberNew contents of line
muaiyd 0:68ce46607848 1 #ifndef COMMON_VARIABLE_H
muaiyd 0:68ce46607848 2 #define COMMON_VARIABLE_H
muaiyd 0:68ce46607848 3 #include "MCP23017.h"
muaiyd 0:68ce46607848 4 #include "WattBob_TextLCD.h"
muaiyd 0:68ce46607848 5 #include "mbed.h"
muaiyd 1:b409ad65466a 6 #include "Servo.h"
muaiyd 0:68ce46607848 7
muaiyd 1:b409ad65466a 8 static Servo SpeedShow_Servo(p21);
muaiyd 0:68ce46607848 9 static MCP23017 Port(p9,p10,0x40) ; // 16-bit object with I2C Chip MCP23017
muaiyd 0:68ce46607848 10 static WattBob_TextLCD LCD(&Port); // A 2*16 chacater LCD object
muaiyd 1:b409ad65466a 11 static BusOut OverSpeedLED(LED1 , LED2 , LED3 , LED4);
muaiyd 1:b409ad65466a 12 static DigitalIn EngineSwitch(p5);
muaiyd 1:b409ad65466a 13 static DigitalOut L1(p27);
muaiyd 1:b409ad65466a 14 static DigitalOut L2(p28);
muaiyd 1:b409ad65466a 15 static DigitalOut L3(p29);
muaiyd 1:b409ad65466a 16 static DigitalOut L4(p30);
muaiyd 1:b409ad65466a 17 static AnalogIn Accelerometer(p19);
muaiyd 1:b409ad65466a 18 static AnalogIn Brake(p20);
muaiyd 0:68ce46607848 19
muaiyd 1:b409ad65466a 20 extern const uint8_t MaxSpeed;
muaiyd 1:b409ad65466a 21
muaiyd 1:b409ad65466a 22 extern bool EngineStat;
muaiyd 1:b409ad65466a 23 extern bool IsOverSpeed;
muaiyd 1:b409ad65466a 24 extern float Accelerometer_Value;
muaiyd 1:b409ad65466a 25 extern float Brake_Value;
muaiyd 1:b409ad65466a 26 extern float SpeedShow;
muaiyd 1:b409ad65466a 27 extern uint8_t Speed[3];
muaiyd 1:b409ad65466a 28 extern uint8_t Average_Speed;
muaiyd 1:b409ad65466a 29 extern float Odometer_Value;
muaiyd 1:b409ad65466a 30 extern uint8_t Counter;
muaiyd 1:b409ad65466a 31
muaiyd 0:68ce46607848 32
muaiyd 0:68ce46607848 33 #endif