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

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 = “”;



           210
   213   214   215   216   217   218   219   220   221   222   223