Description

available() returns the number of bytes available for reading in the stream. This only accounts for bytes that have already arrived.

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.

Syntax

stream.available()

Parameters

None.

Returns

The number of bytes available to read, or 0 if none are available. Data type: int.