Wire.available()
描述
回传藉由 I2C 传送过来的资料量,这些资料可以使用 read()
读取。如果是主端应该在呼叫 requestFrom()
后才呼叫 available()
,如果是从端应该在使用 onReceive()
注册的函式裡呼叫。
available()
是从 Stream
继承而来。
参数
无参数
回传
int
:目前可以读取的资料量,以位元组为单位
See also
- Wire.read()
- Stream.available()
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.