User Tools

Site Tools


en-us_commands:reference:irtcunixtime

This is an old revision of the document!


IrtcUnixTime()

IrtcUnixTime() returns the current time as Unix time.

IrtcUnixTime command operation flow

bool IrtcUnixTime(uint32_t& unixTime)

Commands

Command Arguments Return Value Operation
IrtcUnixTime(unixTime) uint32_t& unixTime bool Returns the current time as Unix time.

Example

uint32_t timestamp;
if (IrtcUnixTime(timestamp)) {
  Serial.println(timestamp);
}

Precautions

Run each device's corresponding Begin command first. Check I²C addresses and pin sharing; if the bool return value is false, inspect wiring and power.

← Built-in Command List

en-us_commands/reference/irtcunixtime.1788785568.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki