Home > other >  In realtek RTL8722 run MicroPython on MCU, use RTC clock
In realtek RTL8722 run MicroPython on MCU, use RTC clock

Time:04-20

RTC (Real Time Clock) can help users quickly query Time, for Time sensitive applications are necessary

Get material
RTL8722 x 1

examples
RTC module will help the micro controller to track time, is module must be part of the time, we have an example here, to show you how to get the local time and upload time,
Copy the code below to REPL, observations,

 
RTC=RTC ()
RTC. Datetime (#) get the date and time
RTC. Datetime ((2020, 12, 31, 4, 23, 58, 59, 0)) # set a specific date and time (year, month, day, weekday (0 for Monday), hour, minute, second, the total seconds)
RTC. Datetime () # check the updated date and time
  • Related