找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

帖子
樓主: eagler8
打印 上一主題 下一主題
收起左側(cè)

【Arduino】168種傳感器系列實(shí)驗(yàn)(153)---Maixduino AI開發(fā)板

[復(fù)制鏈接]
121#
ID:513258 發(fā)表于 2020-3-25 17:37 | 只看該作者


dl.sipeed點(diǎn)com/MAIX/MaixPy/ide/_/v0.2.4/maixpy-ide-windows-0.2.4.exe
回復(fù)

使用道具 舉報(bào)

122#
ID:513258 發(fā)表于 2020-3-25 17:50 | 只看該作者
2、下載結(jié)束,進(jìn)行安裝



回復(fù)

使用道具 舉報(bào)

123#
ID:513258 發(fā)表于 2020-3-25 18:33 | 只看該作者

回復(fù)

使用道具 舉報(bào)

124#
ID:513258 發(fā)表于 2020-3-25 18:56 | 只看該作者
第四步是測試運(yùn)行MaixPy IDE

1、確定開發(fā)板:工具——選擇開發(fā)板——Maixduino




回復(fù)

使用道具 舉報(bào)

125#
ID:513258 發(fā)表于 2020-3-25 19:22 | 只看該作者
2、安裝驅(qū)動(dòng),選擇端口
工具——打開終端——串行端口——COM7——115200




回復(fù)

使用道具 舉報(bào)

126#
ID:513258 發(fā)表于 2020-3-25 19:24 | 只看該作者


2016年6月8日00:22:57
rst:0x1(POWERON-u RESET),引導(dǎo):0x13(SPI FAST-u FLASH-u引導(dǎo))
配置SIP:0,SPIWP:0xee
Drv:0x00,q:0x00,d Drv:0x00,cs0 Drv:0x00,hd Drv:0x00,wp Drv:0x00
模式:DIO,時(shí)鐘div:2
負(fù)載:0x3fff0018,長度:4
負(fù)載:0x3fff001c,長度:868
負(fù)載:0x40078000,長度:9436
負(fù)載:0x40080400,長度:5668
條目0x4008068c

回復(fù)

使用道具 舉報(bào)

127#
ID:513258 發(fā)表于 2020-3-25 20:06 | 只看該作者

3、連接——出錯(cuò)了,多次連不上,不知問題在哪里?






回復(fù)

使用道具 舉報(bào)

128#
ID:513258 發(fā)表于 2020-3-25 21:34 | 只看該作者
經(jīng)檢查,前面燒錄的固件錯(cuò)了,完整版見圖紅點(diǎn)



回復(fù)

使用道具 舉報(bào)

129#
ID:513258 發(fā)表于 2020-3-25 21:39 | 只看該作者
燒錄完成,打開串口,可以到相關(guān)詳情



回復(fù)

使用道具 舉報(bào)

130#
ID:513258 發(fā)表于 2020-3-25 21:46 | 只看該作者
終于連接上了,見底欄的固件版本 0.50



回復(fù)

使用道具 舉報(bào)

131#
ID:513258 發(fā)表于 2020-3-26 08:27 | 只看該作者
  1. #1.將板連接到計(jì)算機(jī)
  2. #2.在MaixPy IDE頂部選擇板:`工具-> 開發(fā)板`
  3. #3.單擊下面的連接按鈕以連接板
  4. #4.單擊下面的綠色運(yùn)行箭頭按鈕運(yùn)行腳本!

  5. import sensor, image, time, lcd                   #導(dǎo)入傳感器,圖像,時(shí)間,液晶

  6. lcd.init(freq = 15000000)
  7. sensor.reset()                                         #重置并初始化傳感器
  8.                                                            #自動(dòng)運(yùn)行,調(diào)用sensor.run(0)停止
  9. sensor.set_pixformat(sensor.RGB565)  #將像素格式設(shè)置為RGB565(或GREYSCALE)
  10. sensor.set_framesize(sensor.QVGA)     #將幀大小設(shè)置為QVGA(320x240)
  11. sensor.skip_frames(time = 2000)         #等待設(shè)置生效。
  12. clock = time.clock()                              #創(chuàng)建一個(gè)時(shí)鐘對象以跟蹤FPS。

  13. while(True):
  14.     clock.tick()                                      #更新FPS時(shí)鐘。
  15.     img = sensor.snapshot()               #拍照并返回圖像。
  16.     lcd.display(img)                             #在LCD上顯示
  17.     print(clock.fps())                       #注意:MaixPy的凸輪在連接時(shí)的運(yùn)行速度大約是其一半
  18.                                                               #到IDE。斷開連接后,F(xiàn)PS應(yīng)增加。
復(fù)制代碼


回復(fù)

使用道具 舉報(bào)

132#
ID:513258 發(fā)表于 2020-3-26 09:11 | 只看該作者




回復(fù)

使用道具 舉報(bào)

133#
ID:513258 發(fā)表于 2020-3-26 09:13 | 只看該作者

回復(fù)

使用道具 舉報(bào)

134#
ID:513258 發(fā)表于 2020-3-26 09:15 | 只看該作者
試拍對面的樓




回復(fù)

使用道具 舉報(bào)

135#
ID:513258 發(fā)表于 2020-3-26 09:59 | 只看該作者
實(shí)時(shí)拍照


  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)
復(fù)制代碼



回復(fù)

使用道具 舉報(bào)

136#
ID:513258 發(fā)表于 2020-3-26 10:02 | 只看該作者




回復(fù)

使用道具 舉報(bào)

137#
ID:513258 發(fā)表于 2020-3-26 10:05 | 只看該作者

回復(fù)

使用道具 舉報(bào)

138#
ID:513258 發(fā)表于 2020-3-26 10:13 | 只看該作者




回復(fù)

使用道具 舉報(bào)

139#
ID:513258 發(fā)表于 2020-3-26 10:30 | 只看該作者
實(shí)時(shí)采集并顯示圖像在TFT屏上,并獲取和顯示實(shí)時(shí)幀數(shù)


  1. #實(shí)時(shí)采集并顯示圖像在TFT屏上,并獲取和顯示實(shí)時(shí)幀數(shù)

  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)
復(fù)制代碼



回復(fù)

使用道具 舉報(bào)

140#
ID:513258 發(fā)表于 2020-3-26 10:43 | 只看該作者
陰天光線不太好,實(shí)時(shí)幀數(shù)為16 fps




回復(fù)

使用道具 舉報(bào)

141#
ID:513258 發(fā)表于 2020-3-26 11:09 | 只看該作者
第五步是使用串口工具

1. 連接硬件
連接 Type C 線, 一端電腦一端開發(fā)板

查看設(shè)備是否已經(jīng)正確識別:

在 Windows 下可以打開設(shè)備管理器來查看

如果沒有發(fā)現(xiàn)設(shè)備, 需要確認(rèn)有沒有裝驅(qū)動(dòng)以及接觸是否良好




回復(fù)

使用道具 舉報(bào)

142#
ID:513258 發(fā)表于 2020-3-26 11:19 | 只看該作者
2. 使用串口工具

(1) putty

www點(diǎn)chiark.greenend點(diǎn)org點(diǎn)uk/~sgtatham/putty/latest.html




回復(fù)

使用道具 舉報(bào)

143#
ID:513258 發(fā)表于 2020-3-26 11:24 | 只看該作者
(2)xshell

xshell.en.soft去掉onic點(diǎn)com/download




回復(fù)

使用道具 舉報(bào)

144#
ID:513258 發(fā)表于 2020-3-26 12:15 | 只看該作者
(3)然后選擇串口模式, 然后設(shè)置串口和波特率,打開串口。


然后點(diǎn)擊回車鍵,即可看到 MaixPy 的交互界面了

回復(fù)

使用道具 舉報(bào)

145#
ID:513258 發(fā)表于 2020-3-26 12:23 | 只看該作者

回復(fù)

使用道具 舉報(bào)

146#
ID:513258 發(fā)表于 2020-3-26 12:45 | 只看該作者
3、檢查固件版本

使用串口終端PuTTY打開串口,然后復(fù)位(或按ctrl+D),看輸出的版本信息,與github 或者 master 分支 的固件版本對比,根據(jù)當(dāng)前版本情況考慮升級到最新版本。這里版本是 v0.5.0-31-gd3e71c0




回復(fù)

使用道具 舉報(bào)

147#
ID:513258 發(fā)表于 2020-3-26 15:43 | 只看該作者
4、串口終端PuTTY的控制命令:

   CTRL-A-在空白行上,進(jìn)入原始REPL模式
   CTRL-B-在空白行上,進(jìn)入常規(guī)REPL模式
   CTRL-C-中斷正在運(yùn)行的程序
   CTRL-D-在空白行上,對電路板進(jìn)行軟復(fù)位
   CTRL-E-在空白行上進(jìn)入粘貼模式

5、有關(guān)可用模塊的列表,請鍵入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
回復(fù)

使用道具 舉報(bào)

148#
ID:221401 發(fā)表于 2020-4-5 18:02 | 只看該作者
eagler8 發(fā)表于 2020-3-24 09:12
嘗試添加 Maix 系列開發(fā)板,這里是MaixduinoPIO 目前提供命令行與圖形界面兩種方式來安裝。1、命令行
點(diǎn)擊 ...

打開后是這個(gè)樣子哦,如何解決?

Microsoft Windows [版本 6.1.7601]
版權(quán)所有 (c) 2009 Microsoft Corporation。保留所有權(quán)利。

C:\Users\Administrator>
回復(fù)

使用道具 舉報(bào)

149#
ID:221401 發(fā)表于 2020-4-5 18:10 | 只看該作者
eagler8 發(fā)表于 2020-3-24 09:12
嘗試添加 Maix 系列開發(fā)板,這里是MaixduinoPIO 目前提供命令行與圖形界面兩種方式來安裝。1、命令行
點(diǎn)擊 ...

83號樓的操作要先運(yùn)行 88號樓,安裝 Git client端,
回復(fù)

使用道具 舉報(bào)

150#
ID:221401 發(fā)表于 2020-4-5 20:07 | 只看該作者
eagler8 發(fā)表于 2020-3-24 09:12
嘗試添加 Maix 系列開發(fā)板,這里是MaixduinoPIO 目前提供命令行與圖形界面兩種方式來安裝。1、命令行
點(diǎn)擊 ...

83樓,platformio platform install “kendryte210” 沒有雙引號,platformio platform install kendryte210
回復(fù)

使用道具 舉報(bào)

151#
ID:221401 發(fā)表于 2020-4-5 20:44 | 只看該作者
eagler8 發(fā)表于 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點(diǎn)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點(diǎn)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 ======================================================
終端進(jìn)程已終止,退出代碼: 1

終端將被任務(wù)重用,按任意鍵關(guān)閉。
回復(fù)

使用道具 舉報(bào)

152#
ID:221401 發(fā)表于 2020-4-5 20:45 | 只看該作者
eagler8 發(fā)表于 2020-3-24 17:19
把接腳改為pin 1,下載成功

105# 如何改?
回復(fù)

使用道具 舉報(bào)

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

謝謝師傅!半年前做的實(shí)驗(yàn),有些忘記,板子也找不到了,呵呵
回復(fù)

使用道具 舉報(bào)

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規(guī)則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機(jī)教程網(wǎng)

快速回復(fù) 返回頂部 返回列表