mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-28 07:02:17 +03:00
Global change
This commit is contained in:
4
lib/Arduino-UpTime/examples/UpTime_synopsis/README
Normal file
4
lib/Arduino-UpTime/examples/UpTime_synopsis/README
Normal file
@@ -0,0 +1,4 @@
|
||||
DESCRIPTION
|
||||
|
||||
synopsis section example from UpTime.h
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
=head1 DESCRIPTION
|
||||
|
||||
synopsis section example from UpTime.h
|
||||
|
||||
=cut
|
||||
*/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <UpTime.h> // https://github.com/jozef/Arduino-UpTime
|
||||
|
||||
uptime_interval fire2(2);
|
||||
uptime_interval fire5(5,UPTIME_RIGHT_AWAY);
|
||||
|
||||
void setup () {
|
||||
Serial.begin(9600);
|
||||
}
|
||||
|
||||
void loop () {
|
||||
Serial.println("uptime: "+uptime_as_string()+" or "+uptime()+"s");
|
||||
if (fire2.check()) Serial.println("2s elapsed");
|
||||
if (fire5.check()) Serial.println("5s elapsed");
|
||||
delay(1400);
|
||||
}
|
||||
Reference in New Issue
Block a user