#include <ESP32Servo.h>
#include <LiquidCrystal_I2C.h>
#include <Keypad.h>
const uint8_t ROWS =4;
const uint8_t COLS =4;
#define I2C_ADD 0X27
#define LCD_ROW 2
#define LCD_COL 16
#define SERVO_PIN 25
#define RED_LED 33
#define GREEN_LED 32
const uint8_t pinRows[ROWS] = {13,14,27,26};
const uint8_t pinCols[COLS] = {19,16,17,18};
char keys[ROWS][COLS]={
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'},
};
LiquidCrystal_I2C lcd(I2C_ADD, LCD_ROW,LCD_COL);
Servo myserv;
Keypad mykey = Keypad(makeKeymap(keys), (byte*)pinRows, (byte*)pinCols, ROWS, COLS);
String input = "";
const String passcode = "1234";
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
// lcd.init();
// lcd.backlight();
// lcd.setCursor(0,0);
// lcd.print("Enter Passcode : ");
Serial.println("Enter Passcode :");
myserv.attach(SERVO_PIN);
myserv.write(0);
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}