Skip to content
UPEEC

Serial Communication (UART)

Send bytes over TX/RX lines — the simplest link to Arduinos, GPS modules and many sensors.

Easy
Comments 0
import serial
with serial.Serial("COM3", 115200, timeout=1) as s:
    s.write(b"READ\n"); print(s.readline().decode().strip())

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.