Combination code safe with daily access

So I am taking on this project where I want to build safe that is password protected. I am going to use a keypad to give access to the safe with a combination code. The issue is that I only want the user to gain access to the safe once a day regardless of the code. So I had two ideas. One would be that there´s an auto-generated password every day - I´m not sure I like this idea. It seems harder than it needs to be. The other would be if I could somehow restrict the user in code.

I am not an Arduino expert, although I´ve dabbled with it some. My question is if this is do-able and I would also appreciate a nudge in the right direction.

I havent started the project so I dont have any code to supply as of yet. But I guess I will be using an arduino, a keypad and a solenoid lock.

I appreciate every bit of help. Thanks

If you want to restrict the user to once each calendar day, you will need a clock and a way to store the date of the most recent opening. You will also need to store that information in EEPROM so that it survives reset or power cycling.

Thanks! I´ll look into this.

One of the most difficult parts is defining the "rules" for once a day.

For instance is 11:50 PM and 12:05AM acceptable? They meet the once a day criteria.

Could a minimum time between accesses be acceptable?

Hi! Thanks for the reply. Sure. I mean I could have a 24 hour timer set every time the safe is opened. I am thinking of making this as a means of limiting myself to snus ( which is this swedish nicotine ) So I need to be able to open it once every 24 hours (or more ) to get my daily dose out.

Everybody quits in a different manner. Good luck, I hope you succeed this time :slight_smile: