I am building a timeclock with multiple outputs.
Here is the part that I'm having problem with.
using DS3231 I read ss(seconds), mm(minutes) hh(hours) then convert it all to seconds. I'm getting readings > 4,000,000,000
1.8.14 Hourly Build 2021/01/29 11:33
unsigned long timecode;
int ss = 30;
int mm = 6;
int hh = 10;
void setup() {
timecode = ((ss) + (mm * 60) + (hh *3600));
// = 36390
// 23:59:59 should = 86,399 maximum
Serial.begin(57600);
}
void loop() {
Serial.println(timecode);
timecode ++;
}