Has anyone ever calculated the sunrise and sunset times using a PIC?
Has anyone ever calculated the sunrise and sunset times using a PIC?
I haven't done it with a PIC but have done it for ZBasic (an advanced clone of the BasicStamp). You maybe can convert my ZBasic code to PBP although it requires single precision floats. The board appears to be setup improperly and chokes on the < when entered as CODE so I have attached a ZIP which includes the procedure I call at midnight. The last 8 lines are for related things but are not needed for dawn/dusk. You'll need to calculate the day of the year yourself. I get it from the ZBasic API.
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Bookmarks