Arduino Function: Console.write

Description

Returns the next byte (character) of incoming data from the console without removing it from the internal buffer. Successive calls to peek() will return the same character, as will the next call to read(). peek() inherits from the Stream utility class.

Syntax

Console.peek()

Returns

 This function returns an int as follows: the first byte of incoming data available -1 if no data is available


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc