Skip to main content

Arduino Serial Communication Beginner Guide (UART Explained)

Serial communication is the backbone of most Arduino projects. It allows your Arduino to talk to your computer, Bluetooth modules, Wi-Fi modules, sensors, and even other Arduinos.

If you have ever used the Serial Monitor, you have already used serial communication - now you will understand how it really works.

By the end of this guide, you will learn:
  • What serial communication is
  • What UART means
  • How Arduino communicates with devices
  • How to send and receive data
  • How baud rate works
  • Common mistakes beginners make

What is Serial Communication?

Serial communication is a method of sending data one bit at a time over a single wire.

Instead of sending many bits simultaneously (parallel communication), serial sends bits sequentially:

Example:
The letter A in binary = 01000001
These bits are sent one after another very quickly.

This method is:
  • Simple
  • Reliable
  • Perfect for microcontrollers

What is UART?

UART stands for:

Universal Asynchronous Receiver Transmitter

It is the hardware inside Arduino that handles serial communication automatically.

UART converts:
  • Parallel data from the Arduino → serial data for transmission
  • Incoming serial data → readable data for Arduino
You don’t see UART directly because the Arduino Serial library controls it for you.

Serial Pins on Arduino

On Arduino Uno:

Pin                        Function

Pin 0                         RX (Receive)
Pin 1                         TX (Transmit)

Important rule:
  • TX sends data
  • RX receives data
  • TX always connects to RX
This is called cross communication.
Figure: UART cross connection between two devices

Hardware Serial vs Software Serial

Hardware Serial

Built-in UART on pins 0 and 1.

Used when Arduino communicates with:
  • Computer (USB)
  • Serial Monitor

Software Serial

A library that creates serial communication on other pins.

Used when connecting modules like:
  • HC-05 / HC-06 Bluetooth
  • GPS modules
  • ESP8266 WiFi
You cannot use pins 0 and 1 while uploading code, so SoftwareSerial becomes essential.

Understanding Baud Rate

Baud rate = speed of communication

Common values:
  • 9600 (most common)
  • 38400
  • 57600
  • 115200
Both devices must use the same baud rate.
If not, you will see random characters.

Think of baud rate as the language speed between two people.

Your First Serial Communication Example

Upload this code to Arduino.
 
void setup() {
Serial.begin(9600);
Serial.println("Arduino is ready!");
}

void loop() {
}


Open the Serial Monitor.

You will see:
 
Arduino is ready!

You just sent data from Arduino → Computer.

Sending Data from Serial Monitor to Arduino

Now we make communication two-way.
 
void setup() {
Serial.begin(9600);
}

void loop() {
if (Serial.available()) {
char data = Serial.read();
Serial.print("You typed: ");
Serial.println(data);
}
}


Type a letter in the Serial Monitor and press Send.

Arduino reads your message and sends a reply.

How This Code Works

Serial.available()

Checks if data has arrived.

Serial.read()

Reads one character from incoming data.

Serial.print() vs Serial.println()

Function                                    Behavior

Serial.print                                prints text on same line
Serial.println                             prints text and moves to next line

Serial Communication Flow

Communication works like a conversation:
  1. Device sends data
  2. Arduino checks if data arrived
  3. Arduino reads the data
  4. Arduino responds
This loop runs thousands of times per second.

Common Beginner Mistakes

Garbage characters in Serial Monitor

Cause: Wrong baud rate.

Nothing appears in Serial Monitor

Check:
  • Correct COM port
  • Correct board selected

Upload fails when using RX/TX pins

Pins 0 and 1 are used by USB.
Disconnect devices before uploading.

Why Serial Communication is Important

Almost every Arduino module uses serial:
  • Bluetooth modules
  • WiFi modules
  • GPS modules
  • Fingerprint sensors
  • RFID readers
Learning serial communication makes future projects much easier.

What You Should Learn Next

Now that you understand serial communication, the best next step is:
  • SoftwareSerial tutorial
  • Bluetooth communication with Arduino
  • Connecting sensors that use serial
This knowledge is the foundation of advanced Arduino and IoT projects.

Frequently Asked Questions

Is serial communication fast?

Yes. For most Arduino projects, 9600–115200 baud is more than enough.

Can Arduino talk to another Arduino?

Yes. Connect TX ↔ RX and share a common ground.

What happens if baud rates don’t match?

Data becomes unreadable (garbage characters).

Comments

Popular posts from this blog

How to Connect HC-06 Bluetooth Module with Arduino (Step-by-Step Beginner Guide)

Bluetooth communication is one of the easiest ways to make Arduino projects wireless. Once you understand how to use a Bluetooth module, you can build robots, home automation systems, and smartphone-controlled devices. In this tutorial, you will learn how to interface the HC-06 Bluetooth module with Arduino and send data wirelessly using your phone.    By the end of this guide, you will be able to: Understand how the HC-06 Bluetooth module works Configure the module using AT commands Safely connect it to an Arduino Send and receive serial data over Bluetooth Build the foundation for wireless Arduino projects Watch the Project Overview What is the HC-06 Bluetooth Module? The HC-06 is a Bluetooth-to-Serial module designed to add wireless communication to microcontrollers such as Arduino. It uses Bluetooth 2.0 (SPP - Serial Port Protocol), which means it behaves like a wireless serial cable. Whatever is sent from the phone appears in Arduino’s Serial Monitor and vice versa. ...

How to Use SoftwareSerial on Arduino (Connect Multiple Serial Devices)

In the previous tutorial, you learned how Arduino uses hardware serial communication through pins 0 (RX) and 1 (TX). That built-in serial port is mainly used to communicate with your computer through the USB cable and Serial Monitor . But here is the problem beginners quickly face: Many popular modules use serial communication, such as: Bluetooth modules ( HC-05 / HC-06 ) GPS modules GSM modules Wi-Fi modules ( ESP8266 ) Arduino Uno has only one hardware serial port. So how can we connect these modules while still using the Serial Monitor? The solution is SoftwareSerial . In this tutorial you will learn how to create additional serial ports using normal digital pins. By the end, your Arduino will be able to talk to multiple serial devices. What is SoftwareSerial? SoftwareSerial is a special Arduino library that allows digital pins to behave like RX and TX pins. This means Arduino can create extra serial ports using software instead of hardware. Hardware Serial vs Software Seri...