int available();
get the number of bytes(characters)avaiable for reading from the serial port.
the bumbers of bytes available to read
int numberscomingBytes = 0; void setup() { Serial.begin(115200); } void loop() { if(Serial.available()>0) { numberscomingBytes = Serial.read(); Serial.print(numberscomingBytes); } }
UARTClass.h
UARTClass Class