Skip to content

Communication Protocols

Reference notes for common peripheral buses used in Arduino, ESP32, Pixhawk, and robot sensor wiring.

In this section

  • Serial — non-blocking UART receive, markers, and parsing (Robin2 tutorial)
  • UART — hardware serial ports, wiring, baud, and Serial vs USB
  • I2C — two-wire bus, addresses, Wire, register read/write
  • SPI — clocked bus, CS lines, modes, and SPI.transfer

Quick comparison

ProtocolTypical wiresMulti-deviceArduino APICommon on robots
UART (async serial)TX, RX, GNDPoint-to-pointSerial, Serial1GPS, telemetry radio, debug
I2CSDA, SCL, GNDYes (addresses)WireIMU, magnetometer, OLED
SPISCK, MOSI, MISO, CS, GNDYes (per-chip CS)SPISD card, LoRa, CAN controller

For message framing and parsing on UART, start with Serial. For pin maps on ESP32, see ESP32.

Curated technical notes — open source on GitHub