描述 设定与初始化 EthernetUDP 物件。 语法 Udp.begin(localPort); 参数 localPort:要监听的本地端埠编号,型态为 int 回传 无回传值 范例 函式库参考主页面 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.
描述 中断与伺服端的连线。 语法 client.stop() 参数 无参数 回传 无回传值 函式库参考主页面 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.
描述 删除所有接收到但还没读取的资料。 flush() 是从 Stream 继承而来。 语法 client.flush() 参数 无参数 回传 无回传值 See also - Stream.flush() 函式库参考主页面 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.
描述 读取从伺服端传送至 Client 的资料。 read() 是从 Stream 继承而来。 语法 client.read() 参数 无参数 回传 byte:从伺服器传送来的资料,如果没有资料可以读取,会回传 -1 See Also - Stream.read() 函式库参考主页面 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.
描述 回传目前与 Client 连线的伺服端传送过来的资料量,这些资料都是目前可以读取的。 available() 是从 Stream 继承而来。 语法 client.available() 参数 无参数 回传 int:目前可以读取的资料量,以位元组为单位 范例 函式库参考主页面 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.
描述 在欲传送的资料最后加上换行字元(’\n’)并且传送到目前与 Client 连线的伺服端。当要传送的资料为数字时,每一位数会被拆开来并各自被当作字元(例:如果要送的资料为 123 ,print() 会把 123 当作 ‘1’, ‘2’, ‘3’ 三个字元)。 语法 client.println() client.println(data) client.print(data, BASE) 参数 data (非必要):要传送的资料,型态可以为 char, byte, int, long 或 string BASE (非必要):BASE 用来指定资料的格式;可用的格式有:BIN (二进位格式)、OCT (八进位格式)、DEC (十进位格式)、HEX (十六进位格式) 回传 byte:回传 println() 传送至伺服端的位元组数量 函式库参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed […]
描述 传送资料到 Client 目前连线的伺服端。当要传送的资料为数字时,每一位数会被拆开来并各自被当作字元(例:如果要送的资料为 123 ,print() 会把 123 当作 ‘1’, ‘2’, ‘3’ 三个字元)。 语法 client.print(data) client.print(data, BASE) 参数 data:要传送的资料,型态可以为 char, byte, int, long 或 string BASE (非必要):BASE 用来指定资料的格式;可用的格式有:BIN (二进位格式)、OCT (八进位格式)、DEC (十进位格式)、HEX (十六进位格式) 回传 byte:回传 print() 传送至伺服端的位元组数量 函式库参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a […]
描述 传送资料到 Client 目前连线的伺服端。 语法 client.write(val) client.write(buf, len) 参数 val:要传送到用户端的资料,大小为一个位元组,型态可以为 byte 或 char buf:一个含有要传送给用户端的资料的阵列,型态可以为 byte 或 char len:要传送的资料阵列的大小 回传 byte:回传 write() 传送至伺服端的位元组数量 函式库参考主页面 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 […]
以下以一系列的连续图示,说明把 86Duino 开发板插上 Windows 7 电脑后,安装 86Duino 驱动程式的步骤。 (回到 在 Windows 下使用 86Duino 页面。) Getting-Started Home The text of the 86Duino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
安装第三方函式库至 86Duino 当使用者对 86Duino 内建的标准函式库相当熟悉了以后,也许想要加入额外的函式库来扩展 86Duino 功能。 函式库是什么? 函式库可以是包含连结感测器、显示器、模组等等的相关程式码。例如,内建的 LiquidCrystal library 可以帮助使用者轻松的与 LCD 显示器沟通。在网路上,有数以百计的第三方函式库可供下载。86Duino 内建的标准函式库以及第三方函式库清单可 点此参考。注意:在使用第三方函式库之前,必须先安装它。 如何安装函式库 函式库通常是以 zip 档或资料夹型式来发布的。资料夹名称即为程式库名称。资料夹内通常包含 .cpp档、.h 档、keywords.txt 档、范例资料夹以及其他函式库需要的档案。 自动安装 安装第三方函式库至开发环境,首先请勿解压缩下载后的函式库压缩档。 在 86Duino 开发环境,将滑鼠游标移至 草稿码 > 汇入函式库,并在下拉式选单中点选最顶端的 “Add Library”。 此时开发环境将提示选择想加入的函式库,请选择想加入的 .zip 档并开启。 回到 草稿码 > 汇入程式库 的选单。此时应该可以看到刚刚加入的函式库显示在下拉式选单中的底端,这代表该函式库已经汇入至 86Duino IDE。 被加入的 zip 档将被解压缩在 86Duino 草稿码资料夹内的 libraries 资料夹中。 注意:虽然草稿码内可以立即使用此函式库,但是此函式库的范例,必需重新启动 86Duino IDE 后才会显示于 档案 […]