Initialization

Before getting information from the RTC, the I2C bus has to be initialized.

Initializing the RTC

The function RTC.ON() powers the RTC up and initializes the I2C bus, used for communicating with the RTC. It reads from the RTC time, date and alarms, setting the corresponding variables.

It returns nothing and modifies no flag.

Example of use:

{‌
RTC.ON(); // Executes the init process‌
}

Switching RTC off

The function RTC.OFF() closes the I2C bus. The RTC is powered directly by the battery (even when Waspmote is off or in sleep mode), so there are no switches to cut power to this chipset. The RTC enters into a low-power state when it detects that no actions are required.

The function returns nothing and modifies no flag.

Example of use:

{‌
RTC.OFF();‌
}

Last updated