Skip to main content
2 of 2
Translation to English and formatting

Serial.available() returns the number of bytes available for reading in the buffer.

int nBytes=Serial.available();
if (nBytes > x) {
............
............
............
}