[SoftwareSerial]
描述
A call to SoftwareSerial(rxPin, txPin)
creates a new SoftwareSerial
object, whose name you need to provide as in the example below.
You need to call SoftwareSerial.begin() to enable communication.
參數
rxPin
: the pin on which to receive serial datatxPin
: the pin on which to transmit serial data
範例
#define rxPin 2 #define txPin 3 // set up a new serial port SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin);
參考
函式庫參考主頁面
86Duino 參考的文本是根據 Creative Commons Attribution-ShareAlike 3.0 License,部分文本是從 the Arduino reference 修改的。 參考中的代碼示例已發佈到公共領域。