¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: New tinySA.exe uploaded


 

With some poking around on the web, it appears that the serial read buffer is 64 bytes.
So Serial.readStringUntil() might be suitable for grabbing a newline terminated tinySA command from the host.

The timeout on that is always in effect, though Serial.setTimout() takes a long (32 bits) to specify how many milliseconds.
and 2**32/1000/60/60/24 is almost 50 days.? Though they don't bother to actually say how long the timeout can be.
I can easily imagine they arbitrarily break the timeout after a few seconds.
They do limit delayMicroseconds() to 16383 microseconds max, I have no idea why.

This lack of concise documentation is disturbing, I'd never know for sure if I had handled all the edge cases.

Jerry, KE7ER


On Mon, Jan 27, 2020 at 03:33 PM, Jerry Gaffke wrote:
There's a lot left unsaid in the Arduino documentation.
For example, from? ?
"Serial.readString()?reads characters from the serial buffer into a String. The function terminates if it times out"


So how big is the buffer?
Exactly what happens when it gets full?

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.?

Join [email protected] to automatically receive all group messages.