read()

描述

read() 可以读取从外部串流进来并存到缓冲区的字元。

这个函式是 Stream 类别的一部分,它可以被任何继承它的类别呼叫 (例如:Wire、Serial 等等)

语法


stream.read()

参数

stream : 一个类别的实例,这个类别是继承于 Stream

回传

读取传进来的 byte 值 (假如没有收到任何资料,则回传 -1) – int 型别

See also

Stream


语法参考主页面

The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.