mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
34 lines
416 B
C++
34 lines
416 B
C++
//
|
|
// FILE: seconds_toClock.ino
|
|
// AUTHOR: Rob Tillaart
|
|
// PURPOSE: demo simple clock
|
|
// URL: https://github.com/RobTillaart/timing
|
|
|
|
|
|
#include "timing.h"
|
|
|
|
uint32_t last = 0;
|
|
|
|
seconds sec;
|
|
|
|
void setup()
|
|
{
|
|
Serial.begin(115200);
|
|
Serial.println(__FILE__);
|
|
|
|
sec.set(3545);
|
|
}
|
|
|
|
|
|
void loop()
|
|
{
|
|
if (last != sec.now())
|
|
{
|
|
last = sec.now();
|
|
Serial.println(sec.toClock());
|
|
}
|
|
}
|
|
|
|
|
|
// -- END OF FILE --
|