Hi, I'm fairly new with programming, and I came across a problem. Is there any way to convert the values of 't.hr' 't.min' and 't.sec' into an integer or long value? Trying to make a digital clock, and I would like to hold the time's in an integer or long. I'm using the DS1302.h library. (I attached a screenshot of what I'm working with.)
Do you want to hold the time in seconds?
time = t.hrs * 60*60 + t.min*60 + t.sec
Welcome to the forum !
Please take a minute and read HOW TO USE THIS FORUM
take a look at #7 about how to post code using 'Code Tags'
as a note, the better formed your question, the easier it is to answer
if you want to light RED leds and want to have
int hours // from 1 to 12
int minutes // from 00 to 59
int seconds // from 00 to 59
then write to the first pair of double digit LED's hour
the second pair of double digit LED's minute
third pair for seconds
Thank you so much for the help guys! Next time I ask a question here, I'll be sure to word, as well as format the information better!