Merge pull request #2021 from kwagyeman/kwabena/timeout_char

scripts/examples: Add timeout_char to uart examples.
This commit is contained in:
Ibrahim Abdelkader 2023-12-04 20:59:44 +02:00 committed by GitHub
commit a31ce6408f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ import time
from pyb import UART
# UART 3, and baudrate.
uart = UART(3, 19200)
uart = UART(3, 19200, timeout_char=200)
while True:
uart.write("Hello World!\n")

View File

@ -10,7 +10,7 @@ import time
from pyb import UART
# Init UART object.
uart = UART("LP1", 19200)
uart = UART("LP1", 19200, timeout_char=200)
while True:
uart.write("Hello World!\r")

View File

@ -14,7 +14,7 @@ from pyb import UART
# 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
# example see the BLE-Shield driver.
uart = UART(3, 19200)
uart = UART(3, 19200, timeout_char=200)
while True:
uart.write("Hello World!\r")

View File

@ -14,7 +14,7 @@ from pyb import UART
# 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
# example see the BLE-Shield driver.
uart = UART(3, 19200)
uart = UART(3, 19200, timeout_char=200)
while True:
uart.write("Hello World!\r")