I NEED HELP
#include <Keypad.h>
char cmd;
const byte ROWS = 4; //four rows
const byte COLS = 4; //four columns
int c=0;char password[5]={'3','1','3','1',''};
boolean password_flag=false;
//define the cymbols on the buttons of the keypads
char hexaKeys[ROWS][COLS] = {
{'1','2','3','a'},
{'4','5','6','b'},
{'7','8','9','c'},
{'','0','#','d'}
};
byte rowPins[ROWS] = { 24,25,22,23}; //connect to the row pinouts of the keypad
byte colPins[COLS] = { 28,29,26,27 }; //connect to the column pinouts of the keypad//initialize an instance of class NewKeypad
Keypad cusomKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);
char customKey = cusomKeypad.getKey();
void setup(){Serial.begin(9600);
cmd=Serial.read();
char customKey = cusomKeypad.getKey();
Serial.print("enter 2\n");
Serial.print(customKey);}
void loop(){
char customKey = cusomKeypad.getKey();
if (customKey != NO_KEY){
if (customKey=='2')
{{
Serial.print("enter pass\n");{
for(int i=0;i<5;i++)
{
if(customKey== password*)*
_ if(cmd==password*)_
_ c++;*_* }*
* if(c==5)*
* password_flag=true;
if( password_flag==true)** Serial.print("all good\n");*
* }}}*
* else*
* {** Serial.print("eror");*
* }*
}}[/quote]
It does not refer to the following code segment> for(int i=0;i<5;i++)
> {
> if(customKey== password*)*
> _ if(cmd==password*)_
> _ c++;_
_>_
> _ }_
> _ if(c==5)_
> password_flag=true;
> if( password_flag==true)
_>_
> _ Serial.print("all good\n");_
> _ }}}[/quote]*_
> ITS JUMP TO THE ELSE