0

I've currently got a program where you have to enter a preset passcode on the remote, which then unlocks the alarm on the Arduino. To lock it you need to enter that alarm back in. Is there a way of allowing someone to enter whatever passcode they wanted to lock and unlock?

Can't seem to find a way of doing this successfully. Any help would be great, thanks.

dda
  • 6,030
  • 2
  • 25
  • 34
user443
  • 43
  • 2

2 Answers2

2

Sure. :)

You can store the passcode in your Arduino's EEPROM.

The library and more infromations can be found here: https://www.arduino.cc/en/Reference/EEPROM

Milos
  • 330
  • 1
  • 9
1

To expand on Milos's answer, you need a way to switch the Arduino between lock/unlock mode and password setup mode. Obviously that mode can/should only happen when the user has already entered the current password. Provide a switch, button, etc, that will tell the Arduino that the user wants to input a new passcode. If the Arduino is in unlock mode, provide visual/audio feedback, and wait for a new passcode. When done, provide visual/audio feedback again, and store that passcode in the Arduino's EEPROM.

dda
  • 6,030
  • 2
  • 25
  • 34