logo

openmv收数据的问题

2019-07-10 09:12
1
_3icr

当openmv的串口没有收到数据时,为什么print函数一直现实的是一

# Blob Detection and uart transport

import sensor, image, time,pyb

from pyb import UART

import json

# For color tracking to work really well you should ideally be in a very, very,

# very, controlled enviroment where the lighting is constant...

yellow_threshold   = (65, 100, -10, 6, 24, 51)

# You may need to tweak the above settings for tracking green things...

# Select an area in the Framebuffer to copy the color settings.



#sensor.reset() # Initialize the camera sensor.

#sensor.set_pixformat(sensor.RGB565) # use RGB565.

#sensor.set_framesize(sensor.QQVGA) # use QQVGA for speed.

#sensor.skip_frames(10) # Let new settings take affect.

#sensor.set_auto_whitebal(False) # turn this off.

clock = time.clock() # Tracks FPS.

led = pyb.LED(3) 

uart = UART(3, 9600)

i=0

while(True):
    i=uart.readchar()
    b=int(uart.readchar())
    
    print(b)
437acde2-ffa6-4d5b-a54c-5223e4ba9ab6.PNG
2019-07-10 17:43
I
网红小智智 星瞳科技

https://singtown.com/learn/50240/

看视频操作。

2019-07-11 14:12
1
_3icr

视频看完了,问题还没解决

2019-07-12 20:57
I
网红小智智 星瞳科技

按照视频的操作步骤操作。

不要用你的readchar函数。