Using arduino uno!!!
i made my own password thing with a keypad 4x4
but don't know how to do this:
changepass:
digitalWrite(ledPin2,HIGH);
delay(100);
digitalWrite(ledPin2,LOW);
Serial.println("");
Serial.print("oude code: ");
key12=keypad.waitForKey();
if(key12 == pass[0])
{
digitalWrite(ledPin2,HIGH);
delay(100);
digitalWrite(ledPin2,LOW);
{
z=1;
Serial.print("*");
goto Aa;
}
}
else
{
goto dump;
}
Aa:
key22=keypad.waitForKey();
if(key22 == pass[1])
{
digitalWrite(ledPin2,HIGH);
delay(100);
digitalWrite(ledPin2,LOW);
{
z=2;
Serial.print("*");
goto Bb;
}
}
else
{
goto dump;
}
Bb:
key32=keypad.waitForKey();
if(key32 == pass[2])
{
digitalWrite(ledPin2,HIGH);
delay(100);
digitalWrite(ledPin2,LOW);
{
z=3;
Serial.print("*");
goto Cc;
}
}
else
{
goto dump;
}
Cc:
key42=keypad.waitForKey();
if(key42 == pass[3])
{
digitalWrite(ledPin2,HIGH);
delay(100);
digitalWrite(ledPin2,LOW);
{
z=4;
Serial.print("*");
goto Dd;
}
}
else
{
goto dump;
}
Dd:
key52=keypad.waitForKey();
if(key52 == pass[4])
{
digitalWrite(ledPin2,HIGH);
delay(100);
digitalWrite(ledPin2,LOW);
{
z=5;
Serial.print("*");
goto Ee;
}
}
else
{
goto dump;
}
Ee:
key62=keypad.waitForKey();
if(key62 == pass[5])
{
digitalWrite(ledPin2,HIGH);
delay(100);
digitalWrite(ledPin2,LOW);
{
z=6;
Serial.print("*");
goto oldcode;
}
}
else
{
goto dump;
}
oldcode:
chang=0;
Serial.println("");
Serial.print("nieuwe code: ");
goto pop;
pop:
if (chang==6)
{
}
else
{
char button = keypad.waitForKey();
if (button) {
chang++;
if(chang==1)
{
key13=button;
Serial.print("*");
digitalWrite(ledPin2,HIGH);
delay(100);
digitalWrite(ledPin2,LOW);
goto pop;
}
else
{
if(chang==2)
{
key23=button;
Serial.print("*");
digitalWrite(ledPin2,HIGH);
delay(100);
digitalWrite(ledPin2,LOW);
goto pop;
}
else
{
if(chang==3)
{
key33=button;
Serial.print("*");
digitalWrite(ledPin2,HIGH);
delay(100);
digitalWrite(ledPin2,LOW);
goto pop;
}
else
{
if(chang==4)
{
key43=button;
Serial.print("*");
digitalWrite(ledPin2,HIGH);
delay(100);
digitalWrite(ledPin2,LOW);
goto pop;
}
else
{
if(chang==5)
{
key53=button;
Serial.print("*");
digitalWrite(ledPin2,HIGH);
delay(100);
digitalWrite(ledPin2,LOW);
goto pop;
}
else
{
if(chang==6)
{
key63=button;
Serial.print("*");
digitalWrite(ledPin2,HIGH);
delay(100);
digitalWrite(ledPin2,LOW);
goto again;
}
}
}
}
}
}
}
}
again://again do the new password
digitalWrite(ledPin2,HIGH);
delay(100);
digitalWrite(ledPin2,LOW);
//new code will save here:
//what i mean is this i just did the new password
//in the keys that end with 3 key13, key23 etc.
//so i want it like change newpass to key13+key23+key33 etc.
Serial.println(); // and then change 'pass' to it!
//so please help me thanks !!!
i just want to combine total of 6 numbers and letters in one but it don't works please help
(it need to works with all combinations that can!!!)
thank you all!!!
![]()
the things that it need to do are:
save the code don't need to be saved if i restart it
the pass need to change to that
need to works with every code that can
-can't type the whole code-
just use other variables i will change it!!