Articles Posted in the " " Category

  • 86Duino 程式开发环境

    86Duino 程式开发环境

    86Duino 程式开发环境 (86Duino Coding) 在介面上,包括了程式码编辑区块、开发环境的讯息显示区块、文字主控台、一般功能按键的工作列以及一连串的功能选单。86Duino 程式开发环境适用于 86Duino 和 Arduino 两种开发板,可以连接它们并且与它们沟通、上传程式。 撰写草稿码 写给 86Duino 或 Arduino 的软体程式码,我们将它称为草稿码(sketch)。这些草稿码应写在开发环境介面中的程式码编辑区块,这些草稿码在储存时将自动加上 (或修改成) .ino 副档名。此程式码编辑区块亦支援剪下、贴上、搜寻及取代功能。开发环境介面的讯息显示区块,会显示有关开发环境当前的状态,例如:储存档案、汇出档案或是发生错误等。文字主控台负责显示出完整的错误资讯以及与 86Duino / Arduino 硬体的连线状况。在介面最右下角显示目前设定要连线的开发板类型以及目前使用的序列埠。工具列上提供验证草稿码、上传程式、建立、开启、储存草稿码以及打开序列埠监控视窗。 验证 检查草稿码内是否有错误。 上传 将草稿码编译后并上传程式至 86Duino 硬体。参考下方的上传章节以取得更多的资讯。当使用 Auduino 外部烧录器时,可以在按下上传按钮前先行按住 shift 键,此时上传的文字提示将变为以烧录器上传。(另外 86Duino 并未提供以烧录器上传的功能。) 新增 建立新的草稿码。 开启 显示出在草稿码簿内的所有草稿码清单。点选其中之一可将其打开至当前的视窗内。由于 Java 的问题,此草稿码清单无法卷动。若是需要开启清单内较尾端的草稿码,建议使用功能表中的 档案 | 草稿码簿 来取代。 储存 储存你的草稿码。 序列埠监控视窗 Opens the 开启序列埠监控视窗. 其他附加的命令可以在下面五种功能表中找到:档案,编辑,草稿码,工具,说明。在这些功能表中的命令,仅在它们可以被执行时才会呈现可使用 (非灰色) 的状态。 编辑 […]


  • connect()

    connect()

    描述 连线到指定的 IP 位址与埠编号。除了使用 IP 位址与埠编号作为指定伺服器的方法,还可以使用网域名称(Domain Name)。 语法 client.connect() client.connect(ip, port) client.connect(URL, port) 参数 ip:要连线的伺服器的 IP 位址(大小为 4 位元组的阵列) URL:要连线的伺服器的网域名称(例:www.86duino.com, 型态为 string) port:要连线的伺服器的埠编号 回传 boolean:如果连线成功回传 true,反之回传 false 范例 函式库参考主页面 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 […]


  • connected()

    connected()

    描述 判断 Client 物件是否连线中。如果用户端与伺服端的连线已经中断了,但是 Client 物件中仍然有从伺服端传送的资料而未被读取的话,该 Client 物件仍被视为连线中。 语法 client.connected() 参数 无参数 回传 boolean:如果该 Client 物件连线中则回传 true,反之回传 false Example 函式库参考主页面 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.


  • if (EthernetClient)

    if (EthernetClient)

    描述 用来判断某个 Client 物件是否已准备好。 语法 if (client) 参数 无参数 回传 boolean:如果该 Client 物件已准备好回传 true ,反之回传 false 范例 函式库参考主页面 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.


  • EthernetClient()

    EthernetClient()

    描述 创建一个用户端,用来与指定的 IP 位址与埠编号连线。(使用 client.connect() 指定伺服端的 IP 位址与埠编号) 语法 EthernetClient() 参数 无参数 范例 函式库参考主页 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.



  • println()

    println()

    描述 在欲传送的资料最后加上换行字元(\n)并且传送到目前与伺服端连线的所有用户端。当要传送的资料为数字时,每一位数会被拆开来并各自被当作字元(例:如果要送的资料为 123 ,print() 会把 123 当作 1, 2, 3 三个字元)。 语法 server.println() server.println(data) server.println(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 under a […]


  • print()

    print()

    描述 传送资料到目前与伺服端连线的所有用户端。当要传送的资料为数字时,每一位数会被拆开来并各自被当作字元(例:如果要送的资料为 123 ,print() 会把 123 当作 1, 2, 3 三个字元)。 语法 server.print(data) server.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 Creative Commons […]


  • write()

    write()

    描述 传送资料到目前与伺服端连线的所有用户端。 语法 server.write(val) server.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 public […]


  • available()

    available()

    描述 取得一个与伺服端连线并且有资料要传送给伺服端的用户端。这个用户端的连线并不会因为 Client 物件解构而中断,如果要中断连线可以呼叫 client.stop()。 available() 是从 Stream 继承而来。 语法 server.available() 参数 无参数 回传 Client 物件:如果没有连线中的用户端或是连线中的用户端都没有资料可以读取,这个回传的 Client 物件等同于 false(参考以下范例) 范例 See Also - Stream.available() 函式库参考主页面 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 […]