#include <Keypad.h>
#include <LiquidCrystal_I2C.h>
#include <Servo.h>
#define buzzer 12
LiquidCrystal_I2C lcd(0x27, 16, 2);
const byte ROWS = 4;
const byte COLS = 4;
char keys[ROWS][COLS]={
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte rowPins[ROWS]={9,8,7,6};
byte colPins[COLS]={5,4,3,2};
Keypad keypad = Keypad(makeKeymap (keys), rowPins, colPins, ROWS,COLS);
void erase()
lcd.clear();
lcd.setcursor(0,0);
char passcode[5] = {'2','4','7','6','1'};
int length = 5;
const int MAXX = 10;
char Safecode[MAXX] = {'0'};
void B3() {
for(int i = 0; i < 3; i=i+1){
digitalWrite(buzzer,HIGH);
delay(1000);
digitalWrite(buzzer,LOW);
delay(1000);
}
void Rotateby20(){
int SP = 0;
while(SP <= 180) {
myServo.write(SP);
delay(1000);
SP = SP + 20;
}
}
}
void lockdoor
MyWire.write(120);
lcd.setcursor(0,1);
lcd.print("safelocked");
delay(2000);
void unlockdoor
MyWire.write(120);
lcd.setcursor(0,2);
lcd.print("safeunlocked");
void setup() {
pinMode(buzzer, OUTPUT)
lcd.init();
lcd.backlight();
MyWire.attach(11);
}
void loop(){
char M = keypad.getkey();
}
int position = 0;
void vex (char M){
int a = 5;
lcd.setCursor(a,1);
a = a+1;
if (position < MAXX){
safeCode[position] = M;
position = position+1;
}
}