HOME SECURITY SYSTEM

Hi! Can anyone help me with a project that I’m working on? Whenever I entered the password, it keeps showing “system deactivated”. Plus I also would like to include an A6 mini GSM Module, can anyone help me with the code? The coding in on the attachment below. Thankyou :slight_smile:

Home Security.txt (8.59 KB)

Hello Dinnaaaaa,

Can you explain this piece of code?

void activate()      // Activate the system if correct PIN entered and display message on the screen
{
  lcd.print(digitalRead(reedPin1));
  if((digitalRead(reedPin1) == HIGH) && (digitalRead(reedPin2) == HIGH) && (digitalRead(reedPin3) == HIGH))
  {
    digitalWrite(redLED, HIGH);
    digitalWrite(2, HIGH);
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("SYSTEM ACTIVATE!"); 
    alarmActive = 1;
    password.reset();
    delay(2000);
    
    displayCodeEntryScreen();
  }
  else{
    deactivate();   // if PIN not corrected, run "deactivate" loop
    
  }
}

Regards

that is the code to activate the system, but you need to connect all the reed switch to 5v and output first in order to activate the system