Page 210 - Tasarım Beceri Atölyeleri Öğretmen El Kitabı
P. 210

}
                     }
                     if (k > 9 || keypressed == ‘#’) {
                       tempPassword = “”;
                       k=5;
                       lcd.clear();

                       lcd.setCursor(0,0);
                       lcd.print(“ *** ALARM *** “);
                       lcd.setCursor(0,1);
                       lcd.print(“Pass>”);
                     }
                     if ( keypressed == ‘*’) {
                       if ( tempPassword == password ) {
                         activated = false;
                         alarmActivated = false;

                         noTone(buzzer);
                         screenOffMsg = 0;
                       }
                       else if (tempPassword != password) {
                         lcd.setCursor(0,1);
                         lcd.print(“Wrong! Try Again”);
                         delay(2000);
                         lcd.clear();
                         lcd.setCursor(0,0);
                         lcd.print(“ *** ALARM *** “);
                         lcd.setCursor(0,1);

                         lcd.print(“Pass>”);
                       }
                     }
                   }
               }



           202
   205   206   207   208   209   210   211   212   213   214   215