Skip to content

UART — read all available (uart_read_all)

What it does: Reads all currently available data from the UART and returns it as text/string.

uart_read_all

Inputs

  • No data inputs.

Output

  • Text or byte string.
  • None if no data was available.

When to use it

  • For simple logs or serial communication diagnostics.
  • When you don't want to deal with message length or tags.

Tips and pitfalls

  • The block is not waiting for the frame to be completed; it only takes what is currently in the buffer.
  • uart_read_line or uart_detect_message is safer for structured data.

Generated Python example

data = read_uart(uart1)