As serial data bytes are being read from the serial buffer by Serial.read()
, are they removed from the Arduino's 64-byte serial buffer altogether?
In my current situation I'm using SoftwareSerial, but this question applies to both software and hardware serial connections.
EDIT: Based on a comment from @dandavis, I'd like to further clarify my question
How does Serial.read()
interact with Serial.available()
? Let's say that I have the usual setup:
while( Serial.available() ) {
Serial.read();
}
What causes Serial.available()
to become false
?
EDIT 2: Changed question title for even further clarification...