Easily create AI projects with Python on edge device
First release
attention, this is a beta version, some API may have changes in ther future
other download links: https://sourceforge.net/projects/maixpy/files/v4.0.10/
download at : https://dl.sipeed.com/shareURL/MAIX/MaixPy/release/master
Update since tag v0.4.0:
kpu.setoutputs(obj, out_layer, w, h, ch)
to set output shape before kpu.forward
load_flash
support (load big model but slowlly)classifier
moduleUTF-8
customize font support, load_font
& draw_font
& draw_string
image.draw_image
transparent mixed (Transparency from black to white)image.font
OV5640
and GC2145
partially function supportulab
modulelodepng
module(for lvgl)sensor.set_jb_quality(q)
for IDE image qualityMaix.utils.flash_read
APIMic-Array
IO pin supports custom configurationconfig.json
fm.fpioa.set_function
args now allow set_io_driving
& set_sl
& set_st
i2c
& spi
nes.input()
& nes.loop()
ws_num()
get ws2812 config number.speech_isolated_word
support maix bit/dock/duino/etc.image.rotation_correction()
image.to_grayscale
buglcd.draw_string
color bughmirror
error(soft fix)bmp
image load errortime.time()
error (RTC hardware bug)time.time()
now start from 2000.1.1 00:00:00
, the same as micropythonkpu.deinit
bug, and auto collect bugmaixpy-ide: http://dl.sipeed.com/MAIX/MaixPy/ide/v0.2.4
cpufreq
module, add Maix.freq
module, now can change CPU and KPU freq max to 600MHz, see doc (#72)machine.reset()
os.getcwd()
return value errorimg.get_statistics()
memory align errordl.sipeed.com or assets below
machine.reset()
os.getcwd()
return value error(#49)img.get_statistics()
memory align error(#55)dl.sipeed.com or assets below
maixpy_v0.3.1_full.bin
: firmware with full functionmaixpy_v0.3.1_no_lvgl.bin
: firmware with no littlvgl supportmaixpy_v0.3.1_minimum.bin
: firmware with minimum function supportface_model_at_0x300000.kfpkg
: face detect model at flash adrees 0x300000
, burn it with kflash(This file contains only the model. Burning this file will not cause the firmware in flash
to be overwritten.)machine.reset()
os.getcwd()
返回值问题(#49)img.get_statistics()
出现的内存对齐错误(#55)dl.sipeed.com 或者下面的 assets 下载
maixpy_v0.3.1_full.bin
: 全功能版本固件maixpy_v0.3.1_no_lvgl.bin
: 不包含 littlvgl 的固件maixpy_v0.3.1_minimum.bin
: 最小功能的固件face_model_at_0x300000.kfpkg
: 将会烧录到flash
地址0x300000
的人脸检测模型,使用kflash
烧录。(此文件只包含模型,烧录此文件不会导致flash
里面的固件被覆盖)UART.any()
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)
UART.set_repl_uart(obj)
, the obj
is UART
object, the old one will be delete automatically(default REPL UART is UARTHS
)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!sensor.run(0)
boot.py
in _boot.py
when BOOT key pushed down on power upBoard_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)
UART.any()
函数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
)clock
模块,因为它看起来比较奇怪,把 clock.clock()
函数移到了 time
模块,删除了 clock.sleep()
函数, 如果需要延时 n 毫秒请使用 time.sleep_ms(n)
, time.sleep(n)
只用来延时 n 秒, 注意这是和 OpenMV
不同的地方sensor.run(1)
,当然可以调用
sensor.run(0)
来停止运行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)
touchscreen
模块时编译出错的问题