Page 299 - 156-PENERAPAN_RANGKAIAN_ELEKTRONIKA
P. 299

PENERAPAN RANGKAIAN
                                                                  ELEKTRONIKA
              MATERI PEMBELAJARAN


            delay(2000);                         // tunda 2 detik
            LCD.clear();                         // Hapus tampilan LCD
                     }
                   }
           // selesai

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

                  }//loop


                  // Sub program
                  =====================================================
                  =======================================



                  //clearData…………………………………………………………..
                  -------------------
                  void clearData()
                  {
                  While(data_count !=0)
                  {//This can be used for any array size,
                  Data[data_count--]=0;             //clear array for new data
                  }
                   return;
                  }



           //gantiPassword1

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

             Void gantipassword(){
             label1:
             LCD.setCursor(0,0);                  // kursor padadan kolom 1
             LCD.print(“Enter New Pass”);             // tampilkan pesan ke LCD
             customKey= keypad.getKey();              // Simpan tombol yang ditekan
             ke variabel “costumKey”
             if (customKey)                           // jika tombol ditekan
             {
             Data[data_count] = customKey;          // simpan char ke data array
             LCD.setCursor(data_count,1);             // kursor pada2
             LCD.print(Data[data_count]);             // tampilkan pesan ke LCD
             data_count++;           // naikkan posisi kolom saat penekanan
             berikutnya
             }

        284                                                       TEKNIK ELEKTRONIKA
                                                                      INDUSTRI
   294   295   296   297   298   299   300   301   302   303   304