[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.
構文
All boards:
Serial.peek()Serial1.peek()
86Duino One specific:
Serial2.peek()Serial3.peek()Serial485.peek()
86Duino EduCake specific:
Serial2.peek()Serial3.peek()Serial232.peek()
媒介変数
None
戻り値
the first byte of incoming serial data available (or -1 if no data is available) – int
参照
- if (Serial)
- available()
- begin()
- end()
- find()
- findUntil()
- flush()
- parseFloat()
- parseInt()
- print()
- println()
- read()
- readBytes()
- readBytesUntil()
- setTimeout()
- write()
- serialEvent()
Language Reference Home
86Duinoリファレンスのテキストは、Arduinoリファレンスを改変したもので、Creative Commons Attribution-ShareAlike 3.0ライセンスに基づいてライセンスされています。リファレンス内のコードサンプルはパブリックドメインとして公開されています。