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.