0

I am trying to make PIR sensor with the buzzer. Using Silicon Labs IDE I was able to compile and run the code but the code is stuck in infinite loop. How to get out of the infinite loop?

while(1)
{
  int i;
  char pass[pass_size];
  keypad(pass,pass_size);
  i=0;
}
if(strncmp(pass,"4201",4)==0)
{`
  accept();
  lcdcmd(1);
  lcdstring("Access Granted ");
  delay(300);`
 }`
else 
{
  lcdcmd(1);
  lcdstring("Access Denied");
  wrong();
  delay(300);
}
}
Miroslav Glamuzina
  • 4,472
  • 2
  • 19
  • 33

0 Answers0