Details
This function reads available characters from the serial port. It does not wait for new characters to
arrive. As long as maxchars is less than 200 characters, all characters that are received by the serial
port (before the serial.read() command is executed) are returned. If too many characters are
received between calls to this function, the RS-232 buffers overflow and some characters may
be lost.
Call this function as many times as necessary to receive the required number of characters. For
optimal performance, use a small delay between repeated calls to this function.
The data returned is the raw data stream read from the port. No characters, such as control
characters or terminator characters, are interpreted.
If you attempt to use this function when the serial port is enabled as a command interface, a settings
conflict error is generated.
Example