Articles Posted by the Author:

  • SoftwareSerial: listen()

    SoftwareSerial: listen()

    描述 指定要监听的软体序列介面。一次只能有一组软体序列介面被监听,没有被监听的软体序列介面其所接收到的资料都会被销毁。预设监听的软体序列介面为最后一个呼叫 begin() 的软体序列介面。 语法 mySerial.listen() 参数 mySerial:要被监听的软体序列介面 回传 无回传值 范例 See also - SoftwareSerial() - begin() - read() - print() - println() 函式库参考主页面 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 […]


  • SoftwareSerial: println(data)

    SoftwareSerial: println(data)

    描述 透过软体序列介面传送资料,在资料传送完成后再传送一个换行字元(’\n’)。运作方式与 Serial.println() 相同。 参数 详情请看 Serial.println() 回传 byte:println() 会回传传送资料的位元组数量 范例 See also - SoftwareSerial() - begin() - print() - println() 函式库参考主页面 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 […]


  • SoftwareSerial: print(data)

    SoftwareSerial: print(data)

    描述 透过软体序列介面传送资料。运作方式与 Serial.print() 相同。 参数 详情请看 Serial.print() 回传 byte:print() 会回传传送资料的位元组数量 范例 See also - SoftwareSerial() - begin() - print() - println() 函式库参考主页面 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 […]


  • SoftwareSerial: read

    SoftwareSerial: read

    描述 回传软体序列介面接收到的资料。 请注意,同一时间只能有一个 SoftwareSerial 物件接收资料,监听指定 SoftwareSerial 物件请呼叫 listen()。 参数 无参数 回传 char:回传软体序列介面接收到的资料中最先收到的字元,如果没有资料可以读则回传 -1 范例 See also - SoftwareSerial() - begin() - print() - println() 函式库参考主页面 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 […]


  • SoftwareSerial: peek

    SoftwareSerial: peek

    描述 回传软体序列介面接收到的资料。不过与 read() 并不相同,在不呼叫 read() 前,每次呼叫 peek() 得到的字元都是相同的。 请注意,同一时间只能有一个 SoftwareSerial 物件接收资料,监听指定 SoftwareSerial 物件请呼叫 listen()。 参数 无参数 回传 char:回传软体序列介面接收到的资料中最先收到的字元,如果没有资料可以读则回传 -1 范例 See also - SoftwareSerial() - begin() - read() - print() - println() 函式库参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 […]


  • SoftwareSerial: overflow()

    SoftwareSerial: overflow()

    描述 检查软体序列介面的缓冲区(buffer)是否溢位(overflow)。呼叫这个函式会清除溢位的旗标(flag),意指除非在呼叫后有新的资料到来,否则再呼叫这个函式会得到 false。 软体序列介面的缓冲区(buffer)的大小是 64 个位元组。 语法 mySerial.overflow() 参数 无参数 回传 boolean:如果缓冲区溢位则回传 true,反之回传 false 范例 See also - SoftwareSerial() - read() - print() - println() 函式库参考主页面 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 […]


  • SoftwareSerial: isListening()

    SoftwareSerial: isListening()

    描述 检查软体序列介面是否被监听中。 语法 mySerial.isListening() 参数 无参数 回传 boolean:如果该软体序列介面被监听中则回传 true,反之回传 false 范例 See also - SoftwareSerial() - read() - print() - println() 函式库参考主页面 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 […]


  • SoftwareSerial: begin(speed)

    SoftwareSerial: begin(speed)

    描述 设定软体序列介面的鲍率(baud rate)。支援的鲍率有:300、600、1200、2400、4800、9600、14400、19200。 参数 speed:鲍率,型态为 long 回传 无回传值 范例 See also - SoftwareSerial() - read() - print() - println() 函式库参考主页面 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.


  • SoftwareSerial: available()

    SoftwareSerial: available()

    描述 取得软体序列介面目前可读资料的位元组数量。这些可读的资料储存在软体序列的缓冲区(buffer)。 语法 mySerial.available() 参数 无参数 回传 int:软体序列介面目前可读资料的位元组数量 范例 See also - SoftwareSerial() - read() - print() - println() 函式库参考主页面 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.


  • SoftwareSerial(rxPin, txPin)

    SoftwareSerial(rxPin, txPin)

    描述 呼叫 SoftwareSerial(rxPin, txPin) 创建新的 SoftwareSerial 物件。 创建完 SoftwareSerial 物件之后还要呼叫 SoftwareSerial.begin() 启动序列介面的功能。 参数 rxPin:用来接收序列资料的脚位 txPin:用来传送序列资料的脚位 范例 See also - SoftwareSerial.begin() - SoftwareSerial.read() - SoftwareSerial.print() - SoftwareSerial.println() 函式库参考主页面 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 […]