UART / Serial (Asynchronous Serial)

Asynchronous serial communication — no shared clock wire. Both devices must agree on baud rate in advance.

  • 2 wires: TX (transmit) + RX (receive) — cross-connected between devices
  • Point-to-point only (2 devices max)
  • Raspberry Pi: GPIO14 = TX, GPIO15 = RX, device /dev/serial0

Python: pyserial library

import serial
with serial.Serial('/dev/serial0', 9600) as ser:
    line = ser.readline()   # read until \n
    ser.write(b'hello\n')   # send bytes

“Serial” in common usage = UART (as opposed to SPI/I2C which are also serial but synchronous).

See Also