Skip to content

v0.3.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@Neutree Neutree released this 18 Apr 11:00
· 598 commits to master since this release

New Features

  • Adapt for OpenMV IDE( Can not use the original version, in order to adapt MaixPy, there are modifications to the IDE source code)
  • Add UART.any()
  • Add get REPL UART object by UART.repl_uart(), e.g. : change baud rate to 1.5M:
from machine import UART

repl = UART.repl_uart()
repl.init(1500000, 8, None, 1, read_buf_len=2048)
  • Add set REPL UART, by UART.set_repl_uart(obj), the obj is UART object, the old one will be delete automatically(default REPL UART is UARTHS)

API Changes

  • Remove clock module, move clock.clock() to time module, remove clock.sleep() function, you MUST use time.sleep_ms(n) to sleep n ms, time.sleep(n) means sleep n s, It's different with OpenMV's!
  • Auto run sensor after sensor reset, you can stop sensor by sensor.run(0)
  • Remove : rewrite boot.py in _boot.py when BOOT key pushed down on power up
  • Create Board_Info object as var board_info in board.py, use it by:
from board import board_info
print(board.BOOT_KEY)

the same as fpioa_manager

from fpioa_manager import fm
fm.register(board_info.LED_R, fm.fpioa.GPIOHS0)

or just import from fpioa_manager

from fpioa_manager import fm, board_info
print(board.BOOT_KEY)
fm.register(board_info.LED_R, fm.fpioa.GPIOHS0)

Fix

  • Fix touchscreen module compile error when not select it in makefile

Download

Docs

maixpy.sipeed.com


新特性

  • 适配 OpenMV IDE (OpenMVP官方IDE不能使用, 为了适配 MaixPy 对 IDE 源码有修改)
  • 添加UART.any() 函数
  • 增加 获取 交互串口对象(REPL UART object) 的方法: UART.repl_uart(), 比如:修改波特率位 1.5M:
from machine import UART

repl = UART.repl_uart()
repl.init(1500000, 8, None, 1, read_buf_len=2048)
  • 增加 重新设置串口对象的接口, 通过 UART.set_repl_uart(obj) 来修改,obj 参数 是一个 UART对象,旧的使用在 REPL 上的串口对象将会被自动销毁(开机 REPL默认使用的串口是 UARTHS)

API 改动

  • 移除了 clock 模块,因为它看起来比较奇怪,把 clock.clock() 函数移到了 time 模块,删除了 clock.sleep() 函数, 如果需要延时 n 毫秒请使用 time.sleep_ms(n)time.sleep(n) 只用来延时 n 秒, 注意这是和 OpenMV 不同的地方
  • 在摄像头初始化后(sensor.reset) 会自动启动运行,不需要再调用 sensor.run(1),当然可以调用
    sensor.run(0) 来停止运行
  • 删除了开机按下 BOOT 键会重新刷写 boot.py 的功能
  • board.py 中新建了一个 Board_Info 对象: board_info,所以使用它如下:
from board import board_info
print(board.BOOT_KEY)

fpioa_manager 也一样

from fpioa_manager import fm
fm.register(board_info.LED_R, fm.fpioa.GPIOHS0)

或者从 fpioa_manager 导入他们

from fpioa_manager import fm, board_info
print(board.BOOT_KEY)
fm.register(board_info.LED_R, fm.fpioa.GPIOHS0)

修复

  • 修复在 Makefile 选择不使用 touchscreen 模块时编译出错的问题

下载

文档

maixpy.sipeed.com