The Arduino stays asleep to conserve battery and only wakes when the button is pressed. Upon waking, there are two paths to go down, flash the green LED, unlock, and go back to sleep OR light up the red LED and wait for 20 seconds for the right passcode, then go to sleep. In the period before it goes to sleep, if you touch(not press) the button for 5 seconds, the passcode will be set to whatever the code is currently. It will then unlock and go back to sleep. The 20 seconds timer restarts every time the button is pressed.
ATmega168/328 on a PCB or an Arduino with a breadboard
3x Potentiometers & knobs
2x 100 ohm resistors
150 ohm resistors
depending on how you make the latch, these parts will be up to you, I used 1/4" square dowels to make the latch and supports
Skills with a Dremmel
Hot Glue Gun
Wood Glue (I recommend Gorilla Wood Glue, the non-foaming kind)
If anyone can decipher the suspected Japanese characters, I would really love to know the original purpose of the box.
He loved it!