Getting my keypad to reset when wrong password is entered
You have the part checking if the key equals the position in the password and if so you increment the position.  But if it is not equal then you don't do anything.  You should probably have an else there that resets the position to 0 and tells the user they entered the wrong password.