找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

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

查看数: 29919 | 评论数: 152 | 收藏 5
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2020-3-6 17:20

正文摘要:

37款传感器与模块的提法,在网络上广泛流传,其实Arduino能够兼容的传感器模块肯定是不止37种的。鉴于本人手头积累了一些传感器和执行器模块,依照实践出真知(一定要动手做)的理念,以学习和交流为目的,这里准备 ...

回复

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 ...

谢谢师傅!半年前做的实验,有些忘记,板子也找不到了,呵呵
ID:221401 发表于 2020-4-5 20:45
eagler8 发表于 2020-3-24 17:19
把接脚改为pin 1,下载成功

105# 如何改?
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

终端将被任务重用,按任意键关闭。
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
ID:221401 发表于 2020-4-5 18:10
eagler8 发表于 2020-3-24 09:12
尝试添加 Maix 系列开发板,这里是MaixduinoPIO 目前提供命令行与图形界面两种方式来安装。1、命令行
点击 ...

83号楼的操作要先运行 88号楼,安装 Git client端,
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>
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
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)
复制代码



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)
复制代码



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应增加。
复制代码


ID:513258 发表于 2020-3-25 16:56
附:kflash_gui 特性
支持 *.bin 和 *.kfpgk 文件, 支持文件选择器选择
支持开发板选择
可选择程序烧录到 Flash 或者 SRAM
自动检测电脑上的串口
波特率可编辑
黑白两种皮肤可供选择
界面支持中英文切换
支持烧录进度显示和烧录速度显示
支持取消下载进程
支持合并多个 bin 文件为一个 bin 文件
支持把 kfpkg 文件转换为一个 bin 文件
支持使能 bin 文件
自动识别文件是不是固件

kflash_gui 使用方法
下载文件(kflash_gui_v*.*) 下载地址:release页面
解压, 并双击 kflash_gui.exe 或 kflash_gui
可以自行建快捷方式或者固定到开始页面或者固定要任务栏方便使用; 如果是 Linux, 可以修改 kflash_gui.desktop 里面的路径, 然后用管理员身份复制到/usr/share/application 目录, 然后就可以在系统菜单里面找到kflash_gui的图标了,点击即可打开
选择 bin 文件或者 kfpkg 文件, 如果是bin文件需要指定地址,如果是固件需要指定0x0000地址
选择开发板
选择烧录到开发板的哪个位置 Flash(速度慢但是重新上电还可运行) 或者 SRAM(RAM中运行,下载快断电丢失程序)
选择串口
选择波特率,推荐1.5M
点击 下载 按钮来开始下载
如果需要取消,点击 取消 按钮


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

Powered by 单片机教程网

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