Serial.Peek History

Hide minor edits - Show changes to output

January 30, 2012, at 05:13 PM by Scott Fitzgerald -
Changed lines 26-28 from:
* [[(Reference.)Serial.available]]()
* [[(Reference.)Serial.flush]]()
* [[(Reference.)Serial.read]]()
to:
(:include Reference/SerialSeeAlsoIncludes:)\\
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 [[Reference/Stream]] utility class.
Changed lines 29-30 from:

to:
*[[/Reference/StreamPeek | Stream.peek]]()

December 05, 2010, at 12:48 AM by David A. Mellis -
Added line 27:
* [[(Reference.)Serial.flush]]()
Changed lines 29-31 from:
* [[(Reference.)Serial.flush]]()

to:

December 05, 2010, at 12:47 AM by David A. Mellis -
Added lines 1-31:
[[Reference/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.)Serial.available]]()
* [[(Reference.)Serial.read]]()
* [[(Reference.)Serial.flush]]()


[[Reference.HomePage | Reference Home]]

Share