Syntax
int available();
ContentsIndex
PreviousUpNext
UARTClass::available Method
UARTClass Class | Example
Syntax
int available();
Description

get the number of bytes(characters)avaiable for reading from the serial port.

Returns

the bumbers of bytes available to read 

Example
int numberscomingBytes = 0;
void setup()
{
    Serial.begin(115200);
}
void loop()
{
    if(Serial.available()>0)
    {
        numberscomingBytes = Serial.read();
        Serial.print(numberscomingBytes);
    }
}
File

UARTClass.h

Class