eagler8
发表于 2020-3-26 10:31:09
实时采集并显示图像在TFT屏上,并获取和显示实时帧数
#实时采集并显示图像在TFT屏上,并获取和显示实时帧数
import sensor
import image
import lcd
import time
clock = time.clock()
lcd.init()
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.run(1)
sensor.skip_frames(30)
while True:
clock.tick()
img = sensor.snapshot()
fps =clock.fps()
img.draw_string(40,2, ("%2.1ffps" %(fps)), color=(128,0,0), scale=2)
lcd.display(img)
eagler8
发表于 2020-3-26 10:44:34
阴天光线不太好,实时帧数为16 fps
eagler8
发表于 2020-3-26 11:10:09
第五步是使用串口工具
1. 连接硬件
连接 Type C 线, 一端电脑一端开发板
查看设备是否已经正确识别:
在 Windows 下可以打开设备管理器来查看
如果没有发现设备, 需要确认有没有装驱动以及接触是否良好
eagler8
发表于 2020-3-26 11:20:04
2. 使用串口工具
(1) putty
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
eagler8
发表于 2020-3-26 11:25:18
(2)xshell
https://xshell.en.softonic.com/download
eagler8
发表于 2020-3-26 12:16:45
(3)然后选择串口模式, 然后设置串口和波特率,打开串口。
然后点击回车键,即可看到 MaixPy 的交互界面了
eagler8
发表于 2020-3-26 12:26:00
eagler8
发表于 2020-3-26 12:48:29
3、检查固件版本
使用串口终端PuTTY打开串口,然后复位(或按ctrl+D),看输出的版本信息,与github 或者 master 分支 的固件版本对比,根据当前版本情况考虑升级到最新版本。这里版本是 v0.5.0-31-gd3e71c0
eagler8
发表于 2020-3-26 15:45:16
4、串口终端PuTTY的控制命令:
CTRL-A-在空白行上,进入原始REPL模式
CTRL-B-在空白行上,进入常规REPL模式
CTRL-C-中断正在运行的程序
CTRL-D-在空白行上,对电路板进行软复位
CTRL-E-在空白行上进入粘贴模式
5、有关可用模块的列表,请键入help('modules')
KPU gc random uio
Maix hashlib re ujson
__main__ heapq sensor ulab
_boot image socket uos
_thread json struct urandom
_webrepl lcd sys ure
array machine time usocket
audio math touchscreen ustruct
binascii math ubinascii utime
board micropython ucollections utimeq
builtins modules ucryptolib uzlib
cmath nes uctypes video
collections network uerrno zlib
errno os uhashlib
fpioa_manager pye_mp uheapq
Plus any modules on the filesystem
页:
1
2
3
4
5
6
7
8
9
[10]