Umm, if I knew where I put it then I would
It's simple enough, I presume your RTC will be a DS1307, there are a few libraries around, easiest is probably DS1307.h then add some of this to your sketch:
#include <Wprogram.h>
#include <Wire.h>
#include <DS1307.h>
int rtc[7];
void setup()
{
RTC.start();
}
void loop()
{
RTC.get(rtc,true);
for(int i=0; i<7; i++)
{
if (rtc[0] < 10 && i==0){ Serial.print("0");}
Serial.print(rtc[i]);
Serial.print(" ");
}
Serial.println();
delay(1000);
}
From the output of that sketch you will be able to work out what rtc[0] to rtc[6] are then you can assign them to variables.
You will also need a sketch to set the time on the RTC, there are a few of them around too.
Call RTC.get(rtc, true) at the start of the sun position calculation, then use rtc as the variables.
I'll see if I can find my code again, if not then I'll whip this back up into a sketch tonight - might add in the time set over serial code too.
Mowcius