Go Down

Topic: Serial TX buffer/blocking (Read 1 time) previous topic - next topic


Do calls to Serial.print() and Serial.println() block? If not, is there a finite transmit buffer that can be corrupted if I transmit too much data too quickly?

I am assuming there must be some kind of TX buffer since there is an explicit Flush method: http://arduino.cc/en/Serial/Flush


Do calls to Serial.print() and Serial.println() block?

Depends on the version of the IDE that you are using, and how much data you are sending. In 0023 and earlier, yes, they block. In 1.0 and later, they put data in a buffer, if there is room. Otherwise, they block until there is room for the data in the buffer. The buffer is 64 bytes.
The art of getting good answers lies in asking good questions.


I'm using 1.0 so I guess my method calls will block if/when they need to.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131