对不起,此内容只适用于English。
86Duino 内建支援序列介面在脚位 0 和 1。内建的序列介面由包含在 86Duino CPU 裡的晶片产生,叫做 UART。因为有这个 UART 晶片提供序列介面,让 86Duino 的 CPU 在处理其他运算时,也可以接收序列介面的输入。 SofrwareSerial 函式库提供把一般的数位脚位作为序列介面的功能,用软体的方式提供和硬体序列介面相同的功能。如果需要产生反向的序列讯号,在初始化时可以利用参数来设定,使得序列介面的输出为反向。 SoftwareSerial 函式库从 86Duino Coding 103 开始支援。 限制 SofrwareSerial 函式库有以下已知的限制: 如果使用多个软体序列介面,同时间只有一个可以接收资料。 86Duino 并不是每一个数位脚位都支援中断,所以只有以下的数位脚位可以作为 RX 信号脚位: 18, 19, 20, 33, 34, 35, 36, 37, 38, 42, 43, 44. 鲍率最高支援到 19200 bps 范例 函式 - SoftwareSerial() - available() - begin() - […]
描述 透过软体序列介面传送资料。运作方式与 Serial.write() 相同。 参数 详情请看 Serial.write() 回传 byte:write() 会回传传送资料的位元组数量 范例 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 […]
描述 指定要监听的软体序列介面。一次只能有一组软体序列介面被监听,没有被监听的软体序列介面其所接收到的资料都会被销毁。预设监听的软体序列介面为最后一个呼叫 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 […]
描述 透过软体序列介面传送资料,在资料传送完成后再传送一个换行字元(’\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 […]
描述 透过软体序列介面传送资料。运作方式与 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 物件接收资料,监听指定 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 […]
描述 回传软体序列介面接收到的资料。不过与 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 […]
描述 检查软体序列介面的缓冲区(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 […]
描述 检查软体序列介面是否被监听中。 语法 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 […]