Does Serial1.print("xyz") cause Serial1.available() to be true?

Status
Not open for further replies.

zachtos

Well-known member
I am having strange bug, when I write with Serial1 or Serial2, it seems to echo back to the Serial1 or Serial2.available()...
Example:

Serial1.println("xyz");
if (Serial1.available()) //should not be true because must come in from other source right? not itself?
{
Serial.print(Serial1.read());
}

I feel like this should not come back on itself as available, I am confused why this occurs, using newest 185 arduino 141 teensy.
 
Might help to see a complete code fragment... Like did you do a Serial1.begin(...)? But yes unless you have Serial1 RX connected to Serial1 TX you should only receive data when it comes in on the RX pin.

Also take a look at your board? Do you have something connected to pin 0 and pin 1? or did you solder in your own headers? Check for solder bridge...
 
Yeah, you're right, I think there is an echo function on the radio, and it is copying what I send out to the TX pin in addition to the wireless transmit.
 
Status
Not open for further replies.
Back
Top