Wire.onReceive(handler)
描述
指定一个函式在从端接收到主端传送的资料时被呼叫。
参数
handler
:函式的名称,这个函式应该要没有回传值以及一个型态为 int
的参数,例如:void myHandler(int numBytes)
,这个 numBytes
的参数代表主端传送过来的资料量大小
回传
无回传值
See also
- Wire.onRequest()
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.