Car alarm system

I0.0 Left door closed
I0.1 Right door closed
I0.2 Trunk (boot) closed
I0.3 Pushbutton for switching alarm system on
I0.4 Pushbutton for switching alarm system off
O0.0 Operates left indicator light
O0.1 Operates right indicator light
O0.2 Operates horn
O0.3 Activates alarm system

The right and left door of the car shown as well as the trunk (boot) can be opened and closed by mouse click. The condition of the closed doors is indicated by sensors. Write a control program to show how the alarm system works.

If you click the red button on the car key, the alarm system is activated. The status is shown by the red indicator light on the right side of the windscreen. If one of the doors or the boot is now opened, the alarm is triggered:

The horn and indicator lights are switched on. The alarm can be switched off by pressing the green button on the key.

The task can be made more complex by having the switching on or off of the alarms system acknowledged by flashing of the indicators and by delaying activation of the alarm by 10 seconds.

  • 3 sensors to detect doors and boot closed
  • 2 pushbuttons to switch alarm on/off
  • Actuators for operating the left and right indicator lights
  • 1 actuator for operating the horn
  • 1 actuator for activating the alarm