readBytes() reads characters from a stream into a buffer. The function terminates if the specified length has been read, or it times out (see Stream.setTimeout()).
This function is part of the Stream class, and can be called by any class that inherits from it (Wire, Serial, etc). See the Stream class main page for more information.
stream.readBytes(buffer, length)
buffer: the buffer to store the bytes in. Allowed data types: array of char or byte.length: the number of bytes to read. Allowed data types: int.The number of bytes placed in the buffer, or 0 if no valid data was found. Data type: size_t.