Car engine system question

Cards (3)

  • Inputs : [8marks]
    • Target temperature (1 – AO 2.1) integer / floating point (1 – AO 3.1).
    • Wheel movement (1 – AO 2.1) Boolean (1 – AO 3.1).
    • Engine running (1 – AO 2.1) Boolean (1 – AO 3.1).
    • Internal temperature (1 – AO 2.1) integer / floating point (1 – AO 3.1).
    • External temperature (1 – AO 2.1) integer / floating point (1 – AO 3.1).
    • External light level (1 – AO 2.1) integer / floating point (1 – AO 3.1).
    • Heating on (1 – AO 2.1) Boolean (1 – AO 3.1).
    • Air conditioning on (1 – AO 2.1) Boolean (1 – AO 3.1).
    • Gears engaged (1 – AO 2.1) Boolean (1 – AO 3.1)
  • Outputs: [2marks]
    • Start engine (1)
    • stop engine (1)
    • signal to dashboard display (1)
  • code for engine system: [8 marks]
    • Use of endless loop while ignition is turned on (1).
    • If external temp < target then override (1). ·
    • If external light < target then override (1). ·
    • If internal temperature < set temperature and heater on then override (1).
    • If internal temperature > set temperature and air conditioning on then override (1). ·
    • If battery output < target then override (1). ·
    • If wheels not moving and gears not engaged and not override then stop engine (1).
    • If override and engine not running then start engine (1).