pyb各种外设 · OpenMV中文入门教程
https://book.openmv.cc/MCU/pyb.html最终pyb会被淘汰,但是目前pyb比machine功能要多。 本教程中,只有I2C使用了machine库。 常用的函数 pyb.delay(50) # 延时 50 毫秒 pyb.millis() # 获取从启动开始计时的毫秒数 LED from pyb import LED led = LED(1) # 红led led.toggle() led.on() #亮 led.off() #灭. LED(1) -> 红LED LED(2) -> 绿LED LED(3 ...
openmv4实现脱机运行 - oldxi - 博客园
www.cnblogs.com › ouyangmail › pJan 06, 2021 · #import time, pyb from time import sleep from pyb import LED led1 = LED(1) led2 = LED(2) led3 = LED(3) # Red LED = 1, Green LED = 2, Blue LED = 3, IR LEDs = 4. #usb = pyb.USB_VCP() # This is a serial port object that allows you to # communciate with your computer. While it is not open the code below runs.