Skip to main content

Posts

Showing posts from April, 2021

Nyalakan Lampu Pakai Password, Keypad Arduino

Nyalakan Lampu Pakai Password, Keypad Arduino Video berikut adalah cara bagaimana membuat password untuk menyalakan lampu, lock door, televisi, kipas, Kunci Pintu, dan lain lain. Untuk code silahkan copy paste script dibawah ini: #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,16,2);  // Include Keypad library #include <Keypad.h> // Length of password + 1 for null character #define Password_Length 8 // Character to hold password input char Data[Password_Length]; // Password char Master[Password_Length] = "123ABCD"; // Pin connected to lock relay input int lockOutput = 13; // Counter for character entries byte data_count = 0; // Character to hold key input char customKey; // Constants for row and column sizes const byte ROWS = 4; const byte COLS = 4; // Array to represent keys on keypad char hexaKeys[ROWS][COLS] = {   {'1', '2', '3', 'A'},   {'4', '5', '6', 'B'},   {'7', '8', ...

Penggunaan Keypad 4x4 dengan LCD Arduino

Penggunaan Keypad 4x4 dengan LCD Arduino Script silahkan copy paste dibawah ini:  #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,16,2);  // Include Keypad library #include <Keypad.h> // Constants for row and column sizes const byte ROWS = 4; const byte COLS = 4;  // Array untuk menjelaskan kunci di keypad char hexaKeys[ROWS][COLS] = {   {'1', '2', '3', 'A'},   {'4', '5', '6', 'B'},   {'7', '8', '9', 'C'},   {'*', '0', '#', 'D'} };   // Koneksi ke Arduino byte rowPins[ROWS] = {9, 8, 7, 6}; byte colPins[COLS] = {5, 4, 3, 2};   // Buat object keypad Keypad customKeypad = Keypad(makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS); void setup(){   // Setup LCD dengan backlight dan initialize   lcd.backlight();   lcd.init();  }   void loop(){   // Get key value if pressed   char customKey = customKeypad.getKey();      if (customKey){     // Be...