keypad + multipassword + 2 rele'

Hi to everyone if I write to you and why I gave up after 8 days and nights sleepless trying to fix and fix my program to run via arduino 2 relays with different passwords … I explain better … i want to activate the first Relay 'with a password (12345 *) and activate the second relay with many passwords I have chosen (eg 47810 *, 47811 *, 47812 *, 47813 *.) … I tried many ways but I have not got any To do it as I would like … I managed to run a single password … 1 single relay … but just modify and try it I’ve never been successful … surely for so many of you and what easy but really not Can I get there … someone so kind to give me the lighting? It would be great to be able to confirm the password with * and reset it with # … use arduino one, keypad, and 2 relay ', thanks

This and I was working on… pls help me!!

#include <Password.h> //
#include <Keypad.h> //

Password password = Password( “111” );
Password password2 = Password( “222” );

int ledPin1 = 11;
int ledPin2 = 12;
const byte ROWS = 4; // 4 rows
const byte COLS = 3; // 3 columns

// Define the Keymap
char keys[ROWS][COLS] = {
{‘1’,‘2’,‘3’},
{‘4’,‘5’,‘6’},
{‘7’,‘8’,‘9’},
{’*’,‘0’,’#’}
};

byte rowPins[ROWS] = { 5,4,3,2};
byte colPins[COLS] = { 8,7,6, };

// Create the Keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

void setup(){

Serial.begin(9600);
keypad.addEventListener(keypadEvent); //add an event listener for this keypad
}

void loop(){
keypad.getKey();
}

//take care of some special events
void keypadEvent(KeypadEvent eKey){
switch (keypad.getState()){
case PRESSED:
Serial.print("Pressed: ");
Serial.println(eKey);
switch (eKey){
case ‘*’:
checkPassword();
checkPassword2();
break;
case ‘#’:
password.reset();
password2.reset();
break;
default:
password.append(eKey);
password2.append(eKey);
}
}
}

void checkPassword(){
if (password.evaluate()){
digitalWrite(ledPin1, HIGH);
delay(1000);
digitalWrite(ledPin1, LOW);
digitalWrite(ledPin2, HIGH);
delay(2000);
digitalWrite(ledPin2, LOW);
}
}
void checkPassword2(){
if (password2.evaluate()){
digitalWrite(ledPin2, HIGH);
delay(1000);
digitalWrite(ledPin2, LOW);
digitalWrite(ledPin1, HIGH);
delay(2000);
digitalWrite(ledPin1, LOW);
}
}
//////////////////////////////////////////////////////
//////////////////////////////////////////////////////
//////////////////////////////////////////////////////
//////////////////////////////////////////////////////

#include <Password.h>
#include <Keypad.h>

Password password1 = Password( “1111” );
Password password2 = Password( “2222” );

int ledpin = 11;
const byte ROWS = 4; // Four rows
const byte COLS = 3; // 3 columns

char keys[ROWS][COLS] = {
{‘1’,‘2’,‘3’},
{‘4’,‘5’,‘6’},
{‘7’,‘8’,‘9’},
{’*’,‘0’,’#’}
};

byte rowPins[ROWS] = { 5,4,3,2};
byte colPins[COLS] = { 8,7,6, };

Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

void setup(){

Serial.begin(9600);
keypad.addEventListener(keypadEvent); //add an event listener for this keypad
}

void loop(){
keypad.getKey();
}

void keypadEvent(KeypadEvent eKey){
switch (keypad.getState()){
case PRESSED:
Serial.print("Pressed: ");
Serial.println(eKey);

switch (eKey){
case ‘*’:
checkPassword();
break;
case ‘#’:
password1.reset();

password2.reset();
break;
default:
password1.append(eKey);
password2.append(eKey);

} return ;
}
}

void checkPassword(){

if (password1.evaluate()){

digitalWrite(ledpin, HIGH);
delay(10000);
digitalWrite(ledpin,LOW);
password1.append(‘1’);

return;

}else if (password2.evaluate()){

digitalWrite(ledpin,HIGH);
delay(10000);
digitalWrite(ledpin,LOW);
password2.append(‘2’);

return;

}else {

return;

//add code to run if it did not work
}return;
}

pls help me!!

There are stickies at the top of the forum that you were supposed to read BEFORE blundering in here. That you failed to post your code correctly, AND resorted to text speak, clearly indicates that you failed to follow directions.

Why should we help you?

How many setup() functions can you have? Any answer other than ONE is wrong.

How many loop() functions can you have? Any answer other than ONE is wrong.