Page 212 - Tasarım Beceri Atölyeleri Öğretmen El Kitabı
P. 212
lcd.clear();
lcd.setCursor(0,0);
lcd.print(“Current Password”);
lcd.setCursor(0,1);
lcd.print(“>”);
}
if ( keypressed == ‘*’) {
i=1;
tone(buzzer, 2000, 100);
if (password == tempPassword) {
tempPassword=””;
lcd.clear();
lcd.setCursor(0,0);
lcd.print(“Set New Password”);
lcd.setCursor(0,1);
lcd.print(“>”);
while(passChangeMode) {
keypressed = myKeypad.getKey();
if (keypressed != NO_KEY){
if (keypressed == ‘0’ || keypressed == ‘1’ || keypressed == ‘2’ || keypressed == ‘3’ ||
keypressed == ‘4’ || keypressed == ‘5’ || keypressed == ‘6’ || keypressed == ‘7’ ||
keypressed == ‘8’ || keypressed == ‘9’ ) {
tempPassword += keypressed;
lcd.setCursor(i,1);
lcd.print(“*”);
i++;
tone(buzzer, 2000, 100);
}
}
if (i > 5 || keypressed == ‘#’) {
tempPassword = “”;
204