Can anyone please help me with below error
error: 'myKeypad' was not declared in this scope
#include <Keypad.h>
int buzzer=12;
int CorrectLED=13;
String password="1234";
String tempPassword="";
const byte ROWS = 4; //four rows
const byte COLS = 4; //four columns
char keypressed;
//define the cymbols on the buttons of the keypad
char keymap [ROWS][COLS] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte rowPins[ROWS] = {3, 4, 5, 6}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {7,8,9,10}; //connect to the column pinouts of the keypad
Keypad mykeypad = Keypad( makeKeymap(keymap), rowPins, colPins, ROWS, COLS );
void setup ()
{
Serial.begin(9600);
pinMode(buzzer,OUTPUT);
pinMode(CorrectLED,OUTPUT);
}
void loop (){
keypressed = myKeypad.getKey();
if (keypressed != NO_KEY);
{
Serial.print(keypressed);
}
}
{
if (keypressed == '0'|| keypressed == '1' || keypressed == '2' || keypressed =='3' ||
keypressed == '4'|| keypressed == '5' || keypressed == '6' || keypressed =='7' ||
keypressed == '8'|| keypressed == '9' || )
{
temppPassword += keypressed
}
if ( keypressed =='*' )
{
if ( tempPassword == password )
digitalWrite(CorrectLED,HIGH);
else
digitalWrite(buzzer,HIGH);
}
if ( keypressed == '#')
{
tempPassword="";
digitalWrite(CorrectLED,LOW);
digitalWrite(buzzer,LOW);
}
}