Peter, On Mon, 06 Jun 2005 14:49:17 +0100, Peter Onion wrote: > On Tue, 2005-06-07 at 00:43 +1200, Jinx wrote: > > > I want to add a light level sensor to a clock I'm building so that at > > > night the back light is dimmed. ( I could use the time of day, but > > > sunrise/sun set calculations look a bit hard for a PIC (lots of trig)). > > > > Could be done with a table > > > > http://www.astro.uu.nl/~strous/AA/en/antwoorden/zonpositie.html#v164 > > The downside to this is you need to know where you are to calculate the > sunrise/unset times. I don't have a method to enter those details. In > reality I could just put lat/long for my house into the code and that > would be good enough (until I move !). Another downside is that knowing sunrise/set times isn't good enough to predict the light level - the time when you need to switch house lights on here can vary by as much as a couple of hours on consecutive days depending on the cloud cover. Much better to measure the actual light level. Cheers, Howard Winter St.Albans, England -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist