In contrasts to older designs like the Arduino Uno, the Arduino Leonardo features a separate connection Serial1
for TTL–UART whereas Serial
is used for the USB CDC UART interface.
This allows one to use the Leonardo as an USB/UART bridge without having to resort to more expensive boards like the Arduino Mega 2560. In order to do this, use this sketch which can also be modified to provide an intelligent UART bridge.
Remember to adjust the baudrate for your application. This version of the sketch does not support automatic baudrate selection via the CDC peripheral.