Please do not use a physical Arduino board, use Simulink.
In this milestone, we will be starting the alarm system project, which is the major assessment task for the second half of this semester. This part of the project will focus on creating a simple alarm system that can be armed and disarmed using a Dashboard switch, as well as detect an intruder (also simulated using a Dashboard switch). Use Simulink logic blocks, compare-to blocks, Dashboard switches, and Lamp blocks to create a model that:
- Has a switch that can be used to arm and disarm the alarm system.
- Has a second switch that will be used to simulate an intruder.
- Has three (3) Lamps: a green Lamp to indicate the system is unarmed, a red Lamp to indicate the system is armed and waiting for an intruder to be detected, and a blue Lamp to indicate an alarm state due to an intruder being detected.
- When the switch is set to unarmed, the green lamp should be on and nothing should happen if an intruder is detected.
- When the switch is set to armed, the green lamp should go off and the red lamp should come on. In the armed state, the system should be waiting for an intruder but still be able to be disarmed using the arm/disarm switch.
- Lastly, if the intruder switch is activated in the armed state, the red lamp should turn off and the blue lamp should turn on to simulate an alarm sounding. Again, the system should be able to be disarmed from this state using the arm/disarm switch. Set up appropriate pacing in Simulink as well as a simulation stop time of infinity (continuous simulation) and make sure to test your system to ensure it behaves as described above.