>>> from pyb import RTC
>>>help(RTC)
object <class 'RTC'> is of type typeinit --<function>info --<function>datetime --<function>wakeup --<function>calibration --<function>
from pyb import RTC
import time
# 定义星期数组
weekdays =['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']
rtc =RTC()
rtc.datetime((2023,11,28,2,21,10,15,0)) # set a specific date and timeif __name__ =='__main__':while True:#Get the current time from the RTCcurrent_time = rtc.datetime()print(current_time) # get date and timetime.sleep(1)year, month, day,weekday, hour, minute, second, yearday = rtc.datetime()# 获取星期对应的数组成员weekday_name = weekdays[weekday]print("当前时间:{}-{}-{} {}:{}:{} Week:{}".format(year, month, day, hour, minute, second,weekday_name))
1. 项目概述:为什么“codex: command not found”成了2026年开发者桌面的高频报错? “codex: command not found”——这行红色错误提示,最近半年在终端里出现的频率,已经快赶上 git status 的刷新次数了。它不是某个冷门工具的…