Protocol Buses Practical (1)
Protocol Buses Practical (1)
Practical
Objective
-To control an LED using serial communication between a microcontroller (such as Arduino)
and a computer, allowing the user to turn the LED on or off by sending commands through a
serial monitor.
Hardware Setup
-Two Arduino UNOS -One 5mm LED -One 220 ohm resistor -Connecting Wires
Breadboard
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
TASK: Control an LED via Serial Communication
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.
Master
Slave
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