More info about Serial.readString()

I think information about Serial.readString() is too short, it tells only "


reads characters from the serial buffer into a String. The function terminates if it times out (see setTimeout()).


inherits from the Stream utility class.
If the function is really about strings, there should be a terminating character or characters?

readString is not about strings but about Strings (capital S). In which case the String class takes care of the terminating character '\0'.

If you are reading in text, check out Arduino Software Solutions tutorial for various sketches to read in text from Serial, both blocking and non-blocking.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.