以下是一个基于 MicroPython 的 Raspberry Pi Pico 多线程 demo:
import_thread
import time
def print_time(thread_name, delay):
while True:
time.sleep(delay)
print("%s: %s" % (thread_name, time.ctime(time.time())))
try:
_thread.start_new_thread(print_time, ("Thread 1", 1, ))
_thr