Which library to use when you want to create password for a door lock system that can be used only once

Good everyone. I new to the Arduino community and so far I love what I am seeing here... I'm also new to coding and I'm working on this project to create a password for my door lock system and it went well .
I decided to store 60 passwords in the memory of the Arduino such that each password can be used only once.... And it has been really difficult for me. I would appreciate any help I terms of library to use and codes that would make me understand the c

I don’t see a library for this purpose , you need to have a go at coding .

Post up your code !

You are likely to have memory issues storing 60 passwords with a Nano/UNO and might need to look at maybe NanoEvery .
Your program is going to have to look through all the remaining passwords for a match , which may also be time consuming . If you are new to programming this may be a bit hard to get a good algorithm .

Have a go at writing something with say 3 passwords - put them in an array , then you can use the array position to determine if that password has been used - see how it goes and assess what the difficulties might be .

What does this mean? No two passwords can be the same or each password can only open the door once? Something else?

Each password can open the door once

Store the passwords in EEPROM and erase each one after it is used.

Thanks I would be uploading the code shortly

Good point other wise which password has been used would be lost if the power fails .


EEPROM is very limited. I would store the passwords in PROGMEM (FLASH) and keep a bitmap in EEPROM of which have been used.

How long can each 'password' be and what characters do you allow in a password?

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.