找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
楼主: eagler8
打印 上一主题 下一主题
收起左侧

【Arduino】168种传感器系列实验(153)---Maixduino AI开发板

[复制链接]
121#
ID:513258 发表于 2020-3-25 17:37 | 只看该作者


dl.sipeed点com/MAIX/MaixPy/ide/_/v0.2.4/maixpy-ide-windows-0.2.4.exe
回复

使用道具 举报

122#
ID:513258 发表于 2020-3-25 17:50 | 只看该作者
2、下载结束,进行安装



回复

使用道具 举报

123#
ID:513258 发表于 2020-3-25 18:33 | 只看该作者

回复

使用道具 举报

124#
ID:513258 发表于 2020-3-25 18:56 | 只看该作者
第四步是测试运行MaixPy IDE

1、确定开发板:工具——选择开发板——Maixduino




回复

使用道具 举报

125#
ID:513258 发表于 2020-3-25 19:22 | 只看该作者
2、安装驱动,选择端口
工具——打开终端——串行端口——COM7——115200




回复

使用道具 举报

126#
ID:513258 发表于 2020-3-25 19:24 | 只看该作者


2016年6月8日00:22:57
rst:0x1(POWERON-u RESET),引导:0x13(SPI FAST-u FLASH-u引导)
配置SIP:0,SPIWP:0xee
Drv:0x00,q:0x00,d Drv:0x00,cs0 Drv:0x00,hd Drv:0x00,wp Drv:0x00
模式:DIO,时钟div:2
负载:0x3fff0018,长度:4
负载:0x3fff001c,长度:868
负载:0x40078000,长度:9436
负载:0x40080400,长度:5668
条目0x4008068c

回复

使用道具 举报

127#
ID:513258 发表于 2020-3-25 20:06 | 只看该作者

3、连接——出错了,多次连不上,不知问题在哪里?






回复

使用道具 举报

128#
ID:513258 发表于 2020-3-25 21:34 | 只看该作者
经检查,前面烧录的固件错了,完整版见图红点



回复

使用道具 举报

129#
ID:513258 发表于 2020-3-25 21:39 | 只看该作者
烧录完成,打开串口,可以到相关详情



回复

使用道具 举报

130#
ID:513258 发表于 2020-3-25 21:46 | 只看该作者
终于连接上了,见底栏的固件版本 0.50



回复

使用道具 举报

131#
ID:513258 发表于 2020-3-26 08:27 | 只看该作者
  1. #1.将板连接到计算机
  2. #2.在MaixPy IDE顶部选择板:`工具-> 开发板`
  3. #3.单击下面的连接按钮以连接板
  4. #4.单击下面的绿色运行箭头按钮运行脚本!

  5. import sensor, image, time, lcd                   #导入传感器,图像,时间,液晶

  6. lcd.init(freq = 15000000)
  7. sensor.reset()                                         #重置并初始化传感器
  8.                                                            #自动运行,调用sensor.run(0)停止
  9. sensor.set_pixformat(sensor.RGB565)  #将像素格式设置为RGB565(或GREYSCALE)
  10. sensor.set_framesize(sensor.QVGA)     #将帧大小设置为QVGA(320x240)
  11. sensor.skip_frames(time = 2000)         #等待设置生效。
  12. clock = time.clock()                              #创建一个时钟对象以跟踪FPS。

  13. while(True):
  14.     clock.tick()                                      #更新FPS时钟。
  15.     img = sensor.snapshot()               #拍照并返回图像。
  16.     lcd.display(img)                             #在LCD上显示
  17.     print(clock.fps())                       #注意:MaixPy的凸轮在连接时的运行速度大约是其一半
  18.                                                               #到IDE。断开连接后,FPS应增加。
复制代码


回复

使用道具 举报

132#
ID:513258 发表于 2020-3-26 09:11 | 只看该作者




回复

使用道具 举报

133#
ID:513258 发表于 2020-3-26 09:13 | 只看该作者

回复

使用道具 举报

134#
ID:513258 发表于 2020-3-26 09:15 | 只看该作者
试拍对面的楼




回复

使用道具 举报

135#
ID:513258 发表于 2020-3-26 09:59 | 只看该作者
实时拍照


  1. import sensor
  2. import image
  3. import lcd

  4. lcd.init()
  5. sensor.reset()
  6. sensor.set_pixformat(sensor.RGB565)
  7. sensor.set_framesize(sensor.QVGA)
  8. sensor.run(1)
  9. while True:
  10.     img=sensor.snapshot()
  11.     lcd.display(img)
复制代码



回复

使用道具 举报

136#
ID:513258 发表于 2020-3-26 10:02 | 只看该作者




回复

使用道具 举报

137#
ID:513258 发表于 2020-3-26 10:05 | 只看该作者

回复

使用道具 举报

138#
ID:513258 发表于 2020-3-26 10:13 | 只看该作者




回复

使用道具 举报

139#
ID:513258 发表于 2020-3-26 10:30 | 只看该作者
实时采集并显示图像在TFT屏上,并获取和显示实时帧数


  1. #实时采集并显示图像在TFT屏上,并获取和显示实时帧数

  2. import sensor
  3. import image
  4. import lcd
  5. import time

  6. clock = time.clock()
  7. lcd.init()
  8. sensor.reset()
  9. sensor.set_pixformat(sensor.RGB565)
  10. sensor.set_framesize(sensor.QVGA)
  11. sensor.run(1)
  12. sensor.skip_frames(30)
  13. while True:
  14.     clock.tick()
  15.     img = sensor.snapshot()
  16.     fps =clock.fps()
  17.     img.draw_string(40,2, ("%2.1ffps" %(fps)), color=(128,0,0), scale=2)
  18.     lcd.display(img)
复制代码



回复

使用道具 举报

140#
ID:513258 发表于 2020-3-26 10:43 | 只看该作者
阴天光线不太好,实时帧数为16 fps




回复

使用道具 举报

141#
ID:513258 发表于 2020-3-26 11:09 | 只看该作者
第五步是使用串口工具

1. 连接硬件
连接 Type C 线, 一端电脑一端开发板

查看设备是否已经正确识别:

在 Windows 下可以打开设备管理器来查看

如果没有发现设备, 需要确认有没有装驱动以及接触是否良好




回复

使用道具 举报

142#
ID:513258 发表于 2020-3-26 11:19 | 只看该作者
2. 使用串口工具

(1) putty

www点chiark.greenend点org点uk/~sgtatham/putty/latest.html




回复

使用道具 举报

143#
ID:513258 发表于 2020-3-26 11:24 | 只看该作者
(2)xshell

xshell.en.soft去掉onic点com/download




回复

使用道具 举报

144#
ID:513258 发表于 2020-3-26 12:15 | 只看该作者
(3)然后选择串口模式, 然后设置串口和波特率,打开串口。


然后点击回车键,即可看到 MaixPy 的交互界面了

回复

使用道具 举报

145#
ID:513258 发表于 2020-3-26 12:23 | 只看该作者

回复

使用道具 举报

146#
ID:513258 发表于 2020-3-26 12:45 | 只看该作者
3、检查固件版本

使用串口终端PuTTY打开串口,然后复位(或按ctrl+D),看输出的版本信息,与github 或者 master 分支 的固件版本对比,根据当前版本情况考虑升级到最新版本。这里版本是 v0.5.0-31-gd3e71c0




回复

使用道具 举报

147#
ID:513258 发表于 2020-3-26 15:43 | 只看该作者
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
回复

使用道具 举报

148#
ID:221401 发表于 2020-4-5 18:02 | 只看该作者
eagler8 发表于 2020-3-24 09:12
尝试添加 Maix 系列开发板,这里是MaixduinoPIO 目前提供命令行与图形界面两种方式来安装。1、命令行
点击 ...

打开后是这个样子哦,如何解决?

Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

C:\Users\Administrator>
回复

使用道具 举报

149#
ID:221401 发表于 2020-4-5 18:10 | 只看该作者
eagler8 发表于 2020-3-24 09:12
尝试添加 Maix 系列开发板,这里是MaixduinoPIO 目前提供命令行与图形界面两种方式来安装。1、命令行
点击 ...

83号楼的操作要先运行 88号楼,安装 Git client端,
回复

使用道具 举报

150#
ID:221401 发表于 2020-4-5 20:07 | 只看该作者
eagler8 发表于 2020-3-24 09:12
尝试添加 Maix 系列开发板,这里是MaixduinoPIO 目前提供命令行与图形界面两种方式来安装。1、命令行
点击 ...

83楼,platformio platform install “kendryte210” 没有双引号,platformio platform install kendryte210
回复

使用道具 举报

151#
ID:221401 发表于 2020-4-5 20:44 | 只看该作者
eagler8 发表于 2020-3-24 16:45
Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: Kendryte K210 1.2.1 > Sipeed MAIXD ...

103#
Processing sipeed-maixduino (platform: kendryte210; framework: arduino; board: sipeed-maixduino)
---------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION:docs.platformio点org/page/boards/kendryte210/sipeed-maixduino.html
PLATFORM: Kendryte K210 1.2.1 #6099b97 > Sipeed MAIXDUINO
HARDWARE: K210 400MHz, 6MB RAM, 16MB Flash
DEBUG: Current (iot-bus-jtag) External (iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, sipeed-rv-debugger, tumpa)
PACKAGES:
- framework-maixduino 0.3.9
- tool-kflash-kendryte210 0.9.1
- tool-openocd-kendryte 1.203.1 (2.3)
- toolchain-kendryte210 8.2.0
LDF: Library Dependency Finder -> bit点ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 14 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Checking size .pio\build\sipeed-maixduino\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   0.5% (used 32456 bytes from 6291456 bytes)
Flash: [          ]   0.4% (used 68319 bytes from 16777216 bytes)
Configuring upload protocol...
AVAILABLE: iot-bus-jtag, jlink, kflash, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, sipeed-rv-debugger, tumpa
CURRENT: upload_protocol = kflash
Looking for upload port...
Auto-detected: COM11
Uploading .pio\build\sipeed-maixduino\firmware.bin
[INFO] COM Port Selected Manually:  COM11
[INFO] Default baudrate is 115200 , later it may be changed to the value you set.
[INFO] Trying to Enter the ISP Mode...
***************
Greeting fail, check serial port ([ERROR] No vaild Kendryte K210 found in Auto Detect, Check Your Connection or Specify One by`-p COM3`  )
*** [upload] Error 1
=========================================================== [FAILED] Took 24.30 seconds ===========================================================

Environment           Status    Duration
--------------------  --------  ------------
sipeed-maix-go        FAILED    00:00:21.691
sipeed-maix-one-dock  FAILED    00:00:22.965
sipeed-maix-bit       FAILED    00:00:23.936
sipeed-maixduino      FAILED    00:00:24.296
====================================================== 4 failed, 0 succeeded in 00:01:32.889 ======================================================
终端进程已终止,退出代码: 1

终端将被任务重用,按任意键关闭。
回复

使用道具 举报

152#
ID:221401 发表于 2020-4-5 20:45 | 只看该作者
eagler8 发表于 2020-3-24 17:19
把接脚改为pin 1,下载成功

105# 如何改?
回复

使用道具 举报

153#
ID:513258 发表于 2020-10-24 15:57 | 只看该作者
john_yike 发表于 2020-4-5 20:44
103#
Processing sipeed-maixduino (platform: kendryte210; framework: arduino; board: sipeed-maixd ...

谢谢师傅!半年前做的实验,有些忘记,板子也找不到了,呵呵
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表