串口发送有问题
-
Hello World Example
Welcome to the OpenMV IDE! Click on the green run arrow button below to run the script!
import sensor, image, time
sensor.reset() # Reset and initialize the sensor.
sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QVGA) # Set frame size to QVGA (320x240)
sensor.skip_frames(time = 2000) # Wait for settings take effect.
clock = time.clock() # Create a clock object to track the FPS.while(True):
clock.tick() # Update the FPS clock.
img = sensor.snapshot() # Take a picture and return the image.
print(clock.fps()) # Note: OpenMV Cam runs about half as fast when connected
# to the IDE. The FPS should increase once disconnected.
-
绝对没有测错,我检查过了
-
-
不好意思我贴错。。。。。。
-
UART Control
This example shows how to use the serial port on your OpenMV Cam. Attach pin
P4 to the serial input of a serial LCD screen to see "Hello World!" printed
on the serial LCD display.
import time
from pyb import UARTAlways pass UART 3 for the UART number for your OpenMV Cam.
The second argument is the UART baud rate. For a more advanced UART control
example see the BLE-Shield driver.
uart = UART(3, 115200, timeout_char = 1000)
while(True):
uart.write("Hello World!\r")
time.sleep(1000)
-
不清楚你哪里的问题
-
我这边和电脑发正常,但是和stm32单片机发就有问题,得到的数不对
-
你不是说你用示波器一直是高电平?怎么和电脑又正常了?
-
现在测也是高电平,但是发数正常,换到32单片机上,单片机可以接受但是接收到的数不对
-
目测
- 你不会用示波器
- stm32 上程序不对
-
不好意思,我这边的单片机串口引脚坏了,换了个单片机都好用了