§02 测试MicroPython
制作一个转接口,测试在MM32F3272G6P上运行的MicroPython。
一、测试LED
1、测试代码
from machine import Pin,UART
import utime
led = Pin('PB2', mode=Pin.OUT_PUSHPULL)
btn = Pin('PB8', mode=Pin.IN_PULLUP)
print("Test Pin In/Out.")
while True:
utime.sleep_ms(100)
led.low()
utime.sleep_ms(100)
led.high()
|