Skip to main content

Real Time Clock

The STM32F7 is equipped with a real-time clock (RTC), which, when set, will retain the system time as long as the the board has power.

Using

To use Meadow's RTC module, simply set the time with the device platform's SetClock method:

Device.PlatformOS.SetClock(new DateTime(
year: 2021,
month: 04,
day: 05,
hour: 15,
minute: 33,
second: 25));

Once set, you can use DateTime.Now to retrieve the current local date and time.

DateTime clock = DateTime.Now;

Sample Application

You can check these RTC Samples on Hackster that you can try out yourself. Notice that you can either set the time manually, or you can use a config file that will get and set your local date and time via Network Time Protocol at app startup.

Video showing a Meadow connected to a multi-line character display showing text, Meadow RTC is now available in b3.9, followed by the date and then the current time with the seconds incrementing.

Build a Clock with Meadow's Onboard Real Time Clock Chip
Build your own clock with an LCD display, a couple of Push Buttons and a Meadow F7 board and its onboard RTC, all using full.NET and C#.

Video showing a vertical LED matrix showing the current date and then the current time when a button is pressed.

Build a WIFI Connected Clock Using Meadow
Build this nifty clock with Meadow getting the date and time from an NTP server via WIFI and room temperature with an LM35 Analog sensor.

Video showing a Meadow connected to a multi-line character display showing the date, time, indoor and outdoor temperatures, and a weather description.

WIFI Christmas Countdown Timer w/ an LCD Display and Meadow
Use Meadow.Foundation to quickly and easily wire up a LCD screen and to make a Christmas countdown display.