Tuesday, 23 April 2013 12:17

Password access with Arduino using keypad

Written by
Arduino and Keypad
This example demonstrates how to use a 4x4 matrix keypad access password from an Arduino. Sketch below required to install password and keypad library, both available at Arduino Playground. Below list the functions of password library:

set(password)
Set the target password equal to password.

is(password)
Is the target password equal to password

append(character)
Append a character to the currently guessed password

reset()
Reset the currently guessed password

evaluate()
Is the guessed password equal to the target password?

Download

 

How it works

  • The secret password is initialize to 1234, you can change this latter by using password.set() command 
  • The maximum of password length is set to 6, any password input length exceed 6 characters will force to execute checkPassword 
  • Waiting for input, valid key for password is 0 to 9.
  • checkPassword is executed if user press #, it compare input password (guess password) and secret password using password.evaluate()
  • If user press the D key, the secret password will reset to 123. Of course you should use your codes to change secret password with keypad.

Read 67665 times Last modified on Sunday, 12 June 2016 10:59

64 comments

Leave a comment

Back to Top