ALARM SYSTEM

I have bought the below components to test the alarm system:

http://www.communica.co.za/Catalog/Details/P1897659969

I used the below code to test the functionality of the ALARM system but does not act as desired,however the behaviour is very different as mentioned below. Please assist.

  • initially, the BUZZER is activated and sounds for a long time and SMS is sent.
  • The buzzer then STOPs and nothing happens.
  • After this, it seems like the motion sensor stops working because even when there is movement, nothing happens.
    Desired functionality:
  • When motion is detected, the BUZZER must sound and an SMS is sent to the user. This should always happen when there is motion detected.
    Please see these these attached code and see AlarmSystem();

alarm_code.txt (8.93 KB)