Page 300 - 156-PENERAPAN_RANGKAIAN_ELEKTRONIKA
P. 300

PENERAPAN RANGKAIAN
                    ELEKTRONIKA

                                                          MATERI PEMBELAJARAN


                   if(data_count == Password_Lenght-1)
                   {
                   LCD.clear();           // hapus tampilan LCD
                   LCD.setCursor(0,0);            // kursor pada kolom dan baris 1
                   LCD.print(“Pass1 Baru :”);             // tampilkan pesan ke LCD
                   LCD.setCursor(0,1);  // kursor pada2
                   for (int I = 0; i<6; i++){
                   LCD.print(Data[i]);        // tampilkan pesan ke LCD passwd[i] = Data[i];
                   EEPROM.write(I,Data[i]);
                   }
                   delay(1000);                           // tunda 1 detik
                   goto awal;                             // menuju awal
                   }
                   goto label1;                           // menuju label 1
                   awal:
                   clearData();                           // kerjakan void clearData
                   LCD.clear();                           // hapus tampilan LCD
                   }



                    //Gantipasword 2

                    ---------------

                        void gantipassword2()
                   {
                   label6:
                   LCD.setCursor(0,0);               //  kursor  padadan  kolom  1  LCD.
                   print(“Enter New Pass”);          // tampilkan pesan ke LCD customKey =
                   keypad.getKey();                           //  naikkan  posisi  kolom  saat
                   penekanan berikutnya
                   if (customKey)                    // jik tombol ditekan
                   {
                   Data[data_count]=customKey;          // simpan char ke data array
                   LCD.setCursor(data_count,1);      // pindah tampilan kursor
                   char
                   LCD.print(Data[data_count]);         // tampilkan pesan ke LCD
                   data_count++;                     // naikkan posisi kolom saat penekanan
                   berikutnya
                   }
                   if(data_count == Password_Lenght-1)
                   {
                   LCD.clear();                               // hapus tampilan LCD
                   LCD.setCursor (0,0);                 // kursor padadan kolom 1
                   LCD.print(“Pass2 Baru :”);                 // tampilkan pesan ke LCD


              TEKNIK ELEKTRONIKA                                                   285
                  INDUSTRI
   295   296   297   298   299   300   301   302   303   304   305