Have a strange one in that with uno board sketch worked fine.
Now with mega i am finding the sketch delivering different results
i am calling
now = rtc.gettime();
Presumably this returns 3 bytes into now
now.hour , now.minutes , now.sec
i have a routine setting the hour of a Wordclock
sethour( now.min, now.hour );
With Uno it use to work defined as
void sethour( byte p_min , byte p_hour )
switch ( p_hour )
case 1: set the leds to light up the letters "one"
case 18: set the leds to light up the letters "six" ( pm )
whats happenning with mega is the value passed in here for hour is now interpreted as hex value in the switch
eg. for value 18 in hour it is falling into the
case 12: as 12 in hex is 18 and so lighting up letters "twelve"
the fix is easy as i just change the routine header signature to
void sethour( int p_min , int p_hour )
Funny thing is the routine to set the minutes still works as it did
any ideas whats going on ?