I'm not sure what the output buffer does for us other than waste RAM.
Why not send each binary byte on its way individually with Serial.write()? ?
Serial.write() is blocking.
If there is no room for your byte in the transmit serial buffer,
the program will hang up in the Serial.write() function until there is room.
Function Serial.availableForWrite() will tell you how much room remains in the transmit buffer.
If you ask when the system is quiet I believe the answer is 64.
Where we need the buffer is on input, waiting for any command to be terminated with a \n
before parsing.
Jerry, KE7ER
toggle quoted message
Show quoted text
On Mon, Jan 27, 2020 at 03:33 PM, Jerry Gaffke wrote:
Seems best on Arduino to only ask the Serial library to do low level character IO one byte at a time.
Do everything else in code you have some control over.?