0% found this document useful (0 votes)
3 views

Control an LED via Serial Communication(Practical) (1)

The document outlines a project to control an LED using serial communication between two Arduino UNOs. The master Arduino sends '1' or '0' to the slave Arduino, which then controls the LED connected to it. The setup includes a connection diagram, required components, and a demonstration of the LED's operation based on the master's signals.

Uploaded by

Ir Azlan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Control an LED via Serial Communication(Practical) (1)

The document outlines a project to control an LED using serial communication between two Arduino UNOs. The master Arduino sends '1' or '0' to the slave Arduino, which then controls the LED connected to it. The setup includes a connection diagram, required components, and a demonstration of the LED's operation based on the master's signals.

Uploaded by

Ir Azlan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

CONTROL AN LED VIA

SERIAL COMMUNICATION
Protocol Buses

Azlan Sa`ad
CONTROL AN LED VIA SERIAL COMMUNICATION
▪ Serial communication where the master will send either ‘1’ or ‘0’ to the slave.
▪ The slave will then receive that data and control an LED connected with its digital pin.
▪ We will use Software Serial to communicate between the two boards.
REQUIRED COMPONENTS
▪ Two Arduino UNOs
▪ One 5mm LED
▪ One 220 ohm resistor
▪ Connecting Wires
▪ Breadboard
CONNECTION DIAGRAM
• Connect virtual pin Tx of
first Arduino board with pin
Rx of second Arduino board.
• Connect virtual pin Rx of
first Arduino board with pin
Tx of second Arduino board.
• We will use Software Serial
to configure pin 10 as RX
and pin 11 as TX.

• Anode pin of LED is


connected with digital pin 2
(slave) through a 220 ohm
current limiting resistor. The
cathode pin is grounded.
• Also make sure both
Arduino boards have their
grounds in common.
CODE FOR MASTER ARDUINO
CODE FOR SLAVE ARDUINO
HARDWARE DEMONSTRATION
• The LED will turn ON and stay ON
for 5 seconds before turning OFF
for 5 seconds.
• This continues as the master keeps
on sending 1/0 to the slave.

You might also like