Beginner- Project "Box that opens once a day"

Hello I have a project to help me and my girlfriend to stop smoking.

The idea is to build a box that have a timer so that it can only be opened once and then when closed you have to wait 24h

I have an arduino uno, LCD keypad shield,

(keypads are going to be hidden in the design but the reset button will be an emergency time zero if time has been to off)

servos (thinking about using 2) and one micro switch(to reset time when closed).

Any thoughts, ideas, and help with this will be grateful

Planning to make the box in plexiglass an CNC made aloy

Thanks

Randomly enable opening once per day between 8AM and 10PM. Have a audible sound go off for 20 seconds to let her know the box can be opened.

I am thinking maybe connect it to an RTC-module and logging when it has been opened. And then save that time in variables and then compare the real time to that "last opened-value". If it is then true you can open the box. If not, servos will keep it closed.

Or maybe a 24 hour delay in and loop ;)

Good luck!

Hi can i use lcd.println("Open "); in my code to trigger the servos?

Ciggbox.ino (946 Bytes)

Hi can i use lcd.println("Open "); in my code to trigger the servos?

No. You can use lcd.print("Open"); (the LCD can NOT handle a carriage return or line feed) and at the same time move the servo. But, lcd.print() can't "trigger" a servo.

is there some whay to trigger the servos when timer hits zero?

is there some whay to trigger the servos when timer hits zero?

Yes.

Of course, we have no idea what timer you are talking about.