1. Connect UNO-1 (Sender) and UNO-2 (Receiver) as per Fig-1. Do not connect the Pot at the moment.
Figure-1:
2. Connect UNO-1 with PC using a USB port.
3. From Desktop, click on the Arduino Icon to open an IDE.
4. Check and record the COM Port assigned to UNO-1.
5. Repeat Step2,3, and 4 for UNO-2.
6. In the IDE of UNO-1, create the following sketch and save it as SendUno. Upload the sketch into UNO-1.
Try writing few lines based on post
#8 and the following Hints:
Hints:
(1) Create Software UART Port (SUART Port) by placing the following lines at the top of steup() function of the sketch.
#include<SoftwareSerial.h>
SoftwareSerial SUART(5, 6); //SRX = Dpin-5, STX = DPin6
(2) Activate SUART Port by placing the following line in the setup() function.
SUART.begin(9600); //speed of SUART Port = 9600 bits/sec
(3) Place the following lines in the loop() function.
SUART.print('1'); // sending 1
SUART.println();
SUART.println('2'); //sending 2
dleay(1000); //test interval
7. In the IDE of UNO-2, create the following sketch and save it as RecvUno. Upload the sketch in UNO-2.
Try writing few lines based on post #8 and the following Hints:
Hints:
(1) Follow Step-6 for the creation of SUART Port at the Receiver side.
(2) Place the following lines in the loop() function.
byte n = SUART.available();
if(n != 0) //there is at least one character in the (Serial) Buffer.
{
char y = SUART.read();
Serial.print(y);
}