資源簡介
使用openMV3與stm32進行通訊,想用openMV與stm32通訊,在網(wǎng)上找了一大圈,最后決定使用串口,參照這篇文章https://blog.csdn.net/qq_43243338/article/details/89441756
代碼片段和文件信息
import?sensor?image?time?math
from?pyb?import?UART
import?json
import?ustruct
#white_threshold_01?=?((95?100?-18?3?-8?4));??#白色閾值
red_threshold_01?=?((35?100?41?77?24?59));
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time?=?2000)
sensor.set_auto_gain(False)?#?must?be?turned?off?for?color?tracking
sensor.set_auto_whitebal(False)?#?must?be?turned?off?for?color?tracking
clock?=?time.clock()
uart?=?UART(3115200)???#定義串口3變量
uart.init(115200?bits=8?parity=None?stop=1)?#?init?with?given?parameters
def?find_max(blobs):????#定義尋找色塊面積最大的函數(shù)
????max_size=0
????for?blob?in?blobs:
????????if?blob.pixels()?>?max_size:
????????????max_blob=blob
????????????max_size?=?blob.pixels()
????return?max_blob
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-04-19?10:07??可見光定位\
?????目錄???????????0??2019-04-19?10:07??可見光定位\HARDWARE\
?????文件????????3382??2012-09-04?11:32??可見光定位\HARDWARE\i2c.c
?????文件?????????316??2019-03-21?14:16??可見光定位\HARDWARE\i2c.h
?????文件???????16921??2019-04-21?20:14??可見光定位\HARDWARE\system.c
?????文件????????1506??2019-04-21?20:14??可見光定位\HARDWARE\system.h
?????目錄???????????0??2019-04-19?10:07??可見光定位\Inc\
?????文件???????24057??2012-06-06?21:27??可見光定位\Inc\fonts.H
?????文件????????6166??2012-06-06?21:27??可見光定位\Inc\lcd.h
?????文件????????3288??2012-06-06?13:27??可見光定位\Inc\stm32f10x_conf.h
?????文件????????1989??2012-06-06?13:27??可見光定位\Inc\stm32f10x_it.h
?????目錄???????????0??2019-04-19?10:07??可見光定位\Libraries\
?????目錄???????????0??2019-04-19?10:07??可見光定位\Libraries\CMSIS\
?????目錄???????????0??2019-04-19?10:07??可見光定位\Libraries\CMSIS\CM3\
?????目錄???????????0??2019-04-19?10:07??可見光定位\Libraries\CMSIS\CM3\CoreSupport\
?????文件???????17273??2012-06-06?13:27??可見光定位\Libraries\CMSIS\CM3\CoreSupport\core_cm3.c
?????文件???????85714??2019-03-23?18:54??可見光定位\Libraries\CMSIS\CM3\CoreSupport\core_cm3.h
?????目錄???????????0??2019-04-19?10:07??可見光定位\Libraries\CMSIS\CM3\DeviceSupport\
?????目錄???????????0??2019-04-19?10:07??可見光定位\Libraries\CMSIS\CM3\DeviceSupport\ST\
?????目錄???????????0??2019-04-19?10:07??可見光定位\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\
?????文件???????26297??2012-06-06?13:27??可見光定位\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\Release_Notes.html
?????目錄???????????0??2019-04-19?10:07??可見光定位\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\
?????目錄???????????0??2019-04-19?10:07??可見光定位\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\
?????文件???????15766??2012-06-06?13:27??可見光定位\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_cl.s
?????文件???????15503??2012-06-06?13:27??可見光定位\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd.s
?????文件???????15692??2012-06-06?13:27??可見光定位\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd_vl.s
?????文件???????12376??2012-06-06?13:27??可見光定位\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld.s
?????文件???????13656??2012-06-06?13:27??可見光定位\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld_vl.s
?????文件???????12765??2012-06-06?13:27??可見光定位\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md.s
?????文件???????14073??2012-06-06?13:27??可見光定位\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md_vl.s
?????文件???????15955??2012-06-06?13:27??可見光定位\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_xl.s
............此處省略213個文件信息
評論
共有 條評論