Serial.peek()

[Serial]

説明

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.

Syntax

All boards:

  • Serial.peek()
  • Serial1.peek()

86Duino One specific:

  • Serial2.peek()
  • Serial3.peek()
  • Serial485.peek()

86Duino EduCake specific:

  • Serial2.peek()
  • Serial3.peek()
  • Serial232.peek()

Parameters

None

Returns

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

See also


Language Reference Home

86Duino のリファレンスのテキストは Arduino レファレンス を編集したもので、 Creative Commons Attribution-ShareAlike 3.0 License下でライセンスされています。リファレンス内のコードサンプルはパブリックドメインとして公開されています。

コメントする

上部へスクロール