mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #2021 from kwagyeman/kwabena/timeout_char
scripts/examples: Add timeout_char to uart examples.
This commit is contained in:
commit
a31ce6408f
@ -33,7 +33,7 @@ import time
|
|||||||
from pyb import UART
|
from pyb import UART
|
||||||
|
|
||||||
# UART 3, and baudrate.
|
# UART 3, and baudrate.
|
||||||
uart = UART(3, 19200)
|
uart = UART(3, 19200, timeout_char=200)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
uart.write("Hello World!\n")
|
uart.write("Hello World!\n")
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import time
|
|||||||
from pyb import UART
|
from pyb import UART
|
||||||
|
|
||||||
# Init UART object.
|
# Init UART object.
|
||||||
uart = UART("LP1", 19200)
|
uart = UART("LP1", 19200, timeout_char=200)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
uart.write("Hello World!\r")
|
uart.write("Hello World!\r")
|
||||||
|
|||||||
@ -14,7 +14,7 @@ from pyb import UART
|
|||||||
# Always pass UART 3 for the UART number for your OpenMV Cam.
|
# Always 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
|
# The second argument is the UART baud rate. For a more advanced UART control
|
||||||
# example see the BLE-Shield driver.
|
# example see the BLE-Shield driver.
|
||||||
uart = UART(3, 19200)
|
uart = UART(3, 19200, timeout_char=200)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
uart.write("Hello World!\r")
|
uart.write("Hello World!\r")
|
||||||
|
|||||||
@ -14,7 +14,7 @@ from pyb import UART
|
|||||||
# Always pass UART 3 for the UART number for your OpenMV Cam.
|
# Always 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
|
# The second argument is the UART baud rate. For a more advanced UART control
|
||||||
# example see the BLE-Shield driver.
|
# example see the BLE-Shield driver.
|
||||||
uart = UART(3, 19200)
|
uart = UART(3, 19200, timeout_char=200)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
uart.write("Hello World!\r")
|
uart.write("Hello World!\r")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user