Description
Reads incoming serial data. read() inherits from the Stream utility class.
Syntax
Serial.read()
Arduino Mega only:
Serial1.read()
Serial2.read()
Serial3.read()
Parameters
Nothing
Returns
The first byte of incoming serial data available (or -1 if no data is available) - int
.