Skip to content

0marAmr/Vehicle-Control-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Vehicle-Control-System

A simulation for a vehicle control dashboard using C language.

System Specifications:

  1. It prompts the user to choose weather to:
    a. Turn on the vehicle engine.
    b. Turn off the vehicle engine.
    c. Quit the system.

  2. Once a choice has been made, the system state is displayed.

  3. Turn on the vehicle engine displays the Sensors set menu, which simulates the vehicle sensors readings:
    a. Turn off the engine.
    b. Set the traffic light color.
    c. Set the room temperature (Temperature Sensor).
    d. Set the engine temperature (Engine Temperature Sensor).

  4. While the engine is ON, Sensors set menu is always displayed, and the dashboard waits for an input.

  5. Based on the input taken:
    a. Based on traffic light data received from a sensor:
      i. If the traffic light is ‘G’ set vehicle speed to 100 km/hr
      ii. If the traffic light is ‘O’ set vehicle speed to 30 km/hr
      iii. If the traffic light is ‘R’ set vehicle speed to 0 km/h
    b. Based on room temperature data from temperature sensor:
      i. If temperature less than 10, Turn AC ON and set temperature to 20
      ii. If temperature is greater than 30, Turn AC ON and set temperature to 20
      iii. If temperature is otherwise, Turn AC OFF
    c. Based on engine temperature data from engine temperature sensor:
      i. If temperature less than 100, Turn “Engine Temperature Controller” ON and set temperature to 125
      ii. If temperature is greater than 150, Turn “Engine Temperature Controller” ON and set temperature to 125v
      iii. If temperature is otherwise, Turn “Engine Temperature Controller” OFF
    d. If vehicle speed is 30 km/hr:
      i. Turn ON AC if it was OFF and set room temperature to: current temperature * (5/4) + 1
      ii. Turn ON “Engine Temperature Controller” if it was OFF and set engine temperature to: current temperature * (5/4) + 1
    e. Display the current vehicle state after applying any of the above options:
      i. Engine state: ON/OFF.
      ii. AC: ON/OFF.
      iii. Vehicle Speed.
      iv. Room Temperature.
      v. Engine Temperature Controller State.
      vi. Engine Temperature.
    Notice that: In the simulation, the sensor read values are taken as an input from the console

System Simulation:

data-frame

Releases

No releases published

Packages

No packages published

Languages