FSI-Arduino/Sketches/sketch_nov01b-millis/sketch_nov01b-millis.ino

18 lines
249 B
C++

unsigned long timeNow;
unsigned long timeLast = millis();
void setup()
{
Serial.begin(9600);
}
void loop()
{
timeNow = millis();
if ((timeLast + 1000) <= timeNow) {
Serial.println(timeNow);
timeLast = timeNow;
}
}