mini project arduino
code #include <Password.h> #include <Keypad.h> Password password = Password( "0000" ); //password to unlock, can be changed const byte ROWS = 4; // Four rows const byte COLS = 3; // columns // Define the Keymap char keys[ROWS][COLS] = { {'1','2','3'}, {'4','5','6'}, {'7','8','9'}, {'*','0','#'} }; // Connect keypad ROW0, ROW1, ROW2 and ROW3 to these Arduino pins. byte rowPins[ROWS] = {8, 7, 6, 5 };// Connect keypad COL0, COL1 and COL2 to these Arduino pins. byte colPins[COLS] = { 4, 3, 2 }; // Create the Keypad Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS ); void setup(){ pinMode(10, OUTPUT); pinMode(11, OUTPUT); //green light pinMode(12, OUTPUT); //red light keypad.addEventListener(keypadEvent); //add an event listener for this keypad } void loop(){...