RFBee firmware updating

Okay the watch dog time is the timer you should be using. It is the only one that is still active in the deepest sleep, and is designed for things just like this. The other on board timer(s), I forget how many the 168 has, do not function in a deep sleep. The JeeNodes link has the code you need and I thought a good explanation of the use. You can always ask specific questions, and I will try to answer. Sigh on client understanding. I hate it when they want to violate the rules of physics to conform with their lack on understanding. Been there done that many times. The watch dog timer is at its slowest faster than you want, so a tight loop counting and sleeping is the answer. Then every n seconds/minutes you can sample the light a few times and decide if it is getting dark. Keep the last 3 to 10 samples, and a running average of them if they are minutes apart that should give you a good indicator of when it is getting dark.

I will answer language question on a time available bases.