Need advice on medication reminder

Need advice on medication reminder

Epileptic has trouble remembering whether he has taken pills. Intend to have LED to come on at pill time and stay on until he graps his cup of pills (the motion). LED goes off until the next morning when system repeats.

LED comes on at 9pm (take your pills)

LED goes off with motion and stays off (IR sensor focused on cup with pills)

LED comes on at 9am (take your pills)

LED goes off with motion and stays off (IR sensor focused on cup with pills)

repeat

This is what I have so far: power>clock device>220 ohm resistor>LED>motion detector>ground

I don't know how to make it stay off after motion and how to make it auto reset system to come back on at prescribed time. Also don't know how to select a timer. Any help while I continue my research will be greatly appreciated.

Welcome to Arduino time.

Always show us your ‘current’ compete sketch.
Use CTRL T to format the sketch.
Please use code tags.
Use the </> icon in the posting menu.

[code] Paste sketch here. [/code]

Show us a good schematic of your circuit.
Show us a good image of your wiring.