I want to send the voltage magnitude received on an analog pin of atmega328Pu to another arduino uno using Serial communication pins TX and RX and display the value on the receiver arduino's Serial monitor.
Transmitter Arduino Code:
void setup()
{
Serial.begin(9600);
pinMode(A0, INPUT);
}
void loop()
{
int voltage=analogRead(A0);
Serial.println(voltage);
}
Receiver Arduino Code:
void setup()
{
Serial.begin(9600);
}
int incomingByte = 0;
void loop()
{
if (Serial.available() > 0) {
incomingByte = Serial.read();
Serial.print("I received: ");
Serial.println(incomingByte, DEC);
}
}
Problem: Now the Problem I am facing is that Serial Monitor of Receiver arduino does not shows anything, it remains blank. Please analyse this system help me in finding out the best way to get around this problem?