[TIP] Fixing Garbage Serial / UART Communication

If you’re using serial (or UART) communication between two devices and seeing data corruption, there could be a simple fix.  For example you might be trying to communicate between two Arduino boards, using one Arduino Uno as a Serial-to-USB adapter for another board, or have an Arduino connected to a  Raspberry PI.

If you’re getting corrupted transmissions that get worse at lower speeds, double-check you have common grounds between the boards.  Inductive coupling is probably letting the communication work.  Without the common ground though, your transmission is going to be susceptible to all kinds of noise.

Tweet: Remember. Ground is a reference. It needs to be common to everything in the circuit.  http://ctt.ec/l6SX3+Remember.  Ground is a reference.  It needs to be common to everything in the circuit.

Long comments, URLs, and code tend to get flagged for spam moderation. No need to resubmit.

ALL comments submitted with fake or throw-away services are deleted, regardless of content.

Don't be a dweeb.

Leave a comment