系统迁移中,暂时无法访问,所有数据会迁移到新的网站。
OpenMV VSCode 扩展发布了,在插件市场直接搜索OpenMV就可以安装
如果有产品硬件故障问题,比如无法开机,论坛很难解决。可以直接找售后维修。
发帖子之前,请确认看过所有的视频教程,https://singtown.com/learn/ 和所有的上手教程http://book.openmv.cc/
每一个新的提问,单独发一个新帖子
帖子需要目的,你要做什么?
如果涉及代码,需要报错提示与全部代码文本,请注意不要贴代码图片
必看:玩转星瞳论坛了解一下图片上传,代码格式等问题。
加入距离传感器 和 串口通信传感器,串口可以通信,但是获取距离的时候,距离传感器报错,
-
Uart error: [Errno 110] ETIMEDOUT
Traceback (most recent call last):
File "", line 96, in
File "", line 49, in start_streaming
File "vl53l1x.py", line 144, in read
OSError: [Errno 110] ETIMEDOUT
-
# Blob Detection and uart transport import sensor, image, time from pyb import UART import json import sys from machine import I2C from vl53l1x import VL53L1X import time i2c = I2C(2) distance = VL53L1X(i2c) print("range: mm ", distance.read()) sensor.reset() # Reset and initialize the sensor. sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE) sensor.set_framesize(sensor.VGA) # Set frame size to QVGA (320x240) sensor.skip_frames(time = 2000) sensor.set_auto_whitebal(True) sensor.set_auto_gain(True) #srnsor.set_ sensor.set_hmirror(True) #水平方向翻转 sensor.set_vflip(True) #垂直方向翻转 uart = UART(3, 115200) while (True): try: if uart.any(): recv_data = uart.read().decode() print("range: mm ", distance.read()) uart.write(distance.read()) except OSError as e: print("Uart error: ", e) sys.print_exception(e)
-
单独运行获取距离是可以的
range: mm 282通过串口获取的时候报错
Uart error: [Errno 110] ETIMEDOUTTraceback (most recent call last):
File "", line 101, in
File "vl53l1x.py", line 144, in read
OSError: [Errno 110] ETIMEDOUT
-
串口扩展板型号 CP2102
-
测距扩展板和串口冲突了。测距扩展板使用了P4P5,和你的串口是相同的引脚,不能同时使用。