1.https://github.com/sipeed/MaixPy/releases从github上下载固件
2.从官网输入机器码获取smodel。如果对获取机器码有疑惑可以看我的这一篇https://blog.csdn.net/qq_34261077/article/details/112386229
https://www.maixhub.com/index.php/index/index/detail/id/225.html这个是获取机器码的官网。
3.进行烧录固件和模型
这里需要用到kflash_gui。https://github.com/sipeed/kflash_gui/releases这是kflash_gui的网址。
4.打开maixpy ide,从GitHub复制代码,执行就好了。
import KPU as kpu
import sensor
import lcd
from Maix import GPIO
from fpioa_manager import fm
from board import board_info
import time
import gc
############### config #################
class_num = 3
sample_num = 15
THRESHOLD = 11
class_names = ['class1', 'class2', 'class3']
board_cube = 0
########################################
def draw_string(img, x, y, text, color, scale, bg=None ):
if bg:
img.draw_rectangle(x-2,y-2, len(text)*8*scale+4 , 16*scale, fill=True, color=bg)
img = img.draw_string(x, y, text, color=color,scale=scale)
return img
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(</