UIFlow Guide
Set the clock
from m5stack import *
from m5stack_ui import *
from uiflow import *
import unit
screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)
rtc_0 = unit.get(unit.RTC8563, unit.PORTA)
rtc_0.set_date_time(37, 1, 1, 1, 0, 0, 0)
while True:
print((str('hours') + str((rtc_0.get_date_time(2)))))
print((str('minutes:') + str((rtc_0.get_date_time(1)))))
print((str('seconds:') + str((rtc_0.get_date_time(0)))))
wait_ms(2)
print((str('alarm flag:') + str((rtc_0.check_alarm_flag()))))
print((str('flag:') + str((rtc_0.check_timer_flag()))))
rtc_0.clear_alarm_flag()
rtc_0.clear_timer_flag()
rtc_0.disable_alarm()
rtc_0.disable_timer()
print((str('rtc:') + str((rtc_0.get_date_time(0)))))
print((str('value:') + str((rtc_0.get_timer_value()))))
rtc_0.pause_timer()
rtc_0.resume_timer()
rtc_0.set_alarm_clock(1, 0, 0)
rtc_0.set_date_time(0, 1, 1, 1, 0, 0, 0)
rtc_0.set_timer_mode(0, 0)