Skip to Content
This is the Beta version of our new Learning Paths approach. Please email feedback.

Real-Time Clock

The Real-Time Clock (RTC) on the UNO Ek WiFi can be accessed using the RTC library that is included in the UNO Ek Board Package. This library allows you to set and get the time as well as use alarms to trigger interrupts.

If the board is not connected to the Internet, the limitation with the RTC on an Arduino board is that it will reset to a base time every time the board is powered off and on again. You need to manually change the program ro set the time every time the board powers on but that is not a practical approach.

The UNO Ek WiFi features a VRTC pin, that is used to keep the onboard RTC running, even when the board is powered off. With this you will have to set the time only once and the RTC will maintain the time as long as it has power (a voltage in the range of 1.6V to 3.6V) through the VRTC pin.

If the board is connected to the Internet over a WiFi network, you can fetch the time from a global Network Time Protocol (NTP) server. This will set the time accurately each time the board is powered on, without requiring any manual code changes.