Serial Communication Between Two Arduino Nano Boards
by DESHBOT in Circuits > Arduino
17 Views, 0 Favorites, 0 Comments
Serial Communication Between Two Arduino Nano Boards
To establish serial communication between two Arduino Nano boards using the TX and RX pins, where one Nano sends messages and the second Nano receives the messages and displays them on a 128×64 OLED display.
Supplies
2 x Deshbot shield
2 × Arduino Nano
1 × 128×64 OLED display
Jumper wires
Communication Method
The project uses UART serial communication between the two Arduino Nano boards.
- Nano 1 → Transmitter
- Nano 2 → Receiver
- Nano 1 sends text through its TX pin.
- Nano 2 receives the text through its RX pin.
- The received message is displayed on the OLED.
5. TX/RX Connections
Nano 1Nano 2
TX / D1
RX / D0
RX / D0
TX / D1
GND/GND
The TX and RX lines are crossed because the transmitter of one board connects to the receiver of the other.
OLED Connections
The OLED is connected to Nano 2, which is the receiver.
OLEDNano 2
VCC - 5V
GND - GND
SDA - A4
SCL - A5
Working Principle
Nano 1 continuously sends messages through its TX pin.
For example:
The message travels through the serial connection to Nano 2.
Nano 2 checks whether data is available using:
When data is received, it reads the message and displays it on the OLED.
Transmitter
Nano 1 acts as the transmitter.
It sends:
and:
alternately.
The communication speed is set to 9600 baud.
Receiver
Nano 2 receives the serial message and displays it on the OLED.
Example:
When the next message arrives:
Conclusion
This project demonstrates how two Arduino Nano boards can communicate using TX and RX serial communication. Nano 1 acts as the transmitter, while Nano 2 receives the data and displays it on an OLED. It provides a simple foundation for building larger multi-Arduino communication systems.