Serial.Peek History

Show minor edits - Show changes to markup

January 30, 2012, at 05:13 PM by Scott Fitzgerald -
Changed lines 26-28 from:
to:
November 04, 2011, at 06:03 PM by Scott Fitzgerald -
Changed lines 7-8 from:

Returns the next byte (character) of incoming serial data without removing it from the internal serial buffer. That is, successive calls to peek() will return the same character, as will the next call to read().

to:

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

Changed lines 29-30 from:
to:
December 05, 2010, at 12:48 AM by David A. Mellis -
Added line 27:
Changed lines 29-31 from:
to:
December 05, 2010, at 12:47 AM by David A. Mellis -
Added lines 1-31:

Serial

peek()

Description

Returns the next byte (character) of incoming serial data without removing it from the internal serial buffer. That is, successive calls to peek() will return the same character, as will the next call to read().

Syntax

Serial.peek()

Arduino Mega only:
Serial1.peek()
Serial2.peek()
Serial3.peek()

Parameters

None

Returns

the first byte of incoming serial data available (or -1 if no data is available) - int

See also

Reference Home

Share