#尝试搭建K210的Micropython开发环境(Win10)
#实验程序之六:测试Microphone阵列算法
代码
#尝试搭建K210的Micropython开发环境(Win10)
#实验程序之六:测试Microphone阵列算法
from Maix import MIC_ARRAY as mic
import lcd
lcd.init()
mic.init()
while True:
imga = mic.get_map()
b = mic.get_dir(imga)
a = mic.set_led(b,(0,0,255))
imgb = imga.resize(160,160)
imgc = imgb.to_rainbow(1)
a = lcd.display(imgc)
mic.deinit()
#尝试搭建K210的Micropython开发环境(Win10)
#实验程序之七:图形与hello maixpy
代码
#尝试搭建K210的Micropython开发环境(Win10)
#实验程序之七:图形与hello maixpy
import lcd, time
import image
bg = (236,36,36)
lcd.init(freq=15000000)
lcd.direction(lcd.YX_RLDU)
img = image.Image()
img.draw_string(60, 100, "hello maixpy", scale=2)
img.draw_rectangle((120,120,30,30))
img.draw_circle((150,140, 80))
img.draw_cross((250,40))
img.draw_arrow((250,200,20,200), color=(236,36,36))
lcd.display(img)
#尝试搭建K210的Micropython开发环境(Win10)
#实验程序之八:碰碰球演示
代码
#尝试搭建K210的Micropython开发环境(Win10)
#实验程序之八:碰碰球演示
import image, lcd
lcd.init(freq=20000000)
i = 0
dir = 1
while(True):
img = image.Image(copy_to_fb=1)
img.clear()
img.draw_rectangle(i,50,50,50)
lcd.display(img)
if dir:
i += 5
if i==270:
dir = 0
else:
i -= 5
if i==0:
dir = 1
在网上搜索,查到一个“K210论坛”,链接为:http://loboris.eu/forum/
伦**2024.03.20
666
DFByQJH1toq2023.08.18
#尝试搭建K210的Micropython开发环境(Win10) #实验程序之七:图形与hello maixpy import lcd, time import image bg =
hacker_2023.07.28
666