Software serial and UART between Arduinos

The serial port, professionally called Universal Asynchronous Receiver/Transmitter (UART) communication, is generally used to program and debug the Arduino via the USB port. There are multiple sensors and systems that use UART as the main communication method, and sometimes we need to discuss between two Arduinos to share information, workload, and so on.

However, most Arduinos only have one serial port, which is used by the USB connection. Serial communication can only happen between two devices. What can we do now? With a bit of luck, we'll have an Arduino Mega or similar that has up to four serial ports, but if we don't, there still is a solution. A special library has been written that simulates an ...

Get Arduino Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.