From c3bb53e25dd4022e2dce355329aab0f3661bf425 Mon Sep 17 00:00:00 2001 From: "Kwabena W. Agyeman" Date: Wed, 22 Nov 2023 17:44:49 -0500 Subject: [PATCH] scripts/examples: Add timeout_char to uart examples. --- .../examples/07-Interface-Library/00-Arduino/arduino_uart.py | 2 +- .../Nicla-Vision/50-Board-Control/uart_control.py | 2 +- .../Portenta-H7/50-Board-Control/uart_control.py | 2 +- .../examples/50-OpenMV-Boards/50-Board-Control/uart_control.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/examples/07-Interface-Library/00-Arduino/arduino_uart.py b/scripts/examples/07-Interface-Library/00-Arduino/arduino_uart.py index dce7148c6..3996cf760 100644 --- a/scripts/examples/07-Interface-Library/00-Arduino/arduino_uart.py +++ b/scripts/examples/07-Interface-Library/00-Arduino/arduino_uart.py @@ -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") diff --git a/scripts/examples/50-Arduino-Boards/Nicla-Vision/50-Board-Control/uart_control.py b/scripts/examples/50-Arduino-Boards/Nicla-Vision/50-Board-Control/uart_control.py index 8b1a9eb56..61c6eb080 100644 --- a/scripts/examples/50-Arduino-Boards/Nicla-Vision/50-Board-Control/uart_control.py +++ b/scripts/examples/50-Arduino-Boards/Nicla-Vision/50-Board-Control/uart_control.py @@ -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") diff --git a/scripts/examples/50-Arduino-Boards/Portenta-H7/50-Board-Control/uart_control.py b/scripts/examples/50-Arduino-Boards/Portenta-H7/50-Board-Control/uart_control.py index 28b546712..7a252e290 100644 --- a/scripts/examples/50-Arduino-Boards/Portenta-H7/50-Board-Control/uart_control.py +++ b/scripts/examples/50-Arduino-Boards/Portenta-H7/50-Board-Control/uart_control.py @@ -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") diff --git a/scripts/examples/50-OpenMV-Boards/50-Board-Control/uart_control.py b/scripts/examples/50-OpenMV-Boards/50-Board-Control/uart_control.py index 28b546712..7a252e290 100644 --- a/scripts/examples/50-OpenMV-Boards/50-Board-Control/uart_control.py +++ b/scripts/examples/50-OpenMV-Boards/50-Board-Control/uart_control.py @@ -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")