Serial buffer

Hi all,

I am new to serial programming and I would like to know exactly how the arduino serial buffer works.

The reference doesn't specify when the a byte is removed from the buffer

If you read a byte with Serial.read will it get rid of the byte? Does it have to be pushed out of the serial buffer? Do the bytes expire over time?

Thanks for your help
Conor

Serial.read(); removes a byte from the buffer.
Serial.flush(); removes all bytes from the buffer.
:slight_smile: