Articles Posted in the " " Category

  • EthernetUDP.remoteIP()

    EthernetUDP.remoteIP()

    描述 取得远端连线的 IP 位址。 要使用 remoteIP() 前必须先呼叫 UDP.parsePacket()。 语法 Udp.remoteIP(); 参数 无参数 回传 4 bytes:远端连线的 IP 位址 范例 函式库参考主页面 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.


  • 在 Fedora 上建立 86Duino Coding 执行环境

    在 Fedora 上建立 86Duino Coding 执行环境

    86Duino Coding 的执行需要 Java JRE,下面将说明在 Fedora 上安装 Java JRE套件的步骤。另外,86Duino Coding 将 sketch 烧录到 86Duino 开发板时,为避免找不到序列埠和 Modem Manager 干扰,我们也将介绍如何更改相关设定档。(若您是使用 Coding 207 以前的版本,建立环境的方式请参考这里) Step 1 开启终端机: Step 2 安装 Java JRE 套件。 如果您的 Fedora 版本是 18 以上,请略过此步骤,直接进行 Step 3。 如果您的 Fedora 版本是 17/16,请键入以下指令:     sudo yum install java-1.7.0-openjdk.i686 您将看到 Java JRE 套件的安装画面如下: Step 3 为避免 Modem Manager 干扰 […]


  • IPAddress()

    IPAddress()

    描述 定义 IP 位址。可以用来描述本机或远端的位址。 语法 IPAddress(address); 参数 位址:一串以逗号分隔的数字用以代表位址(4 个位元组,如: 192, 168, 1, 1) 回传 无回传值 范例 函式库参考主页面 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.


  • EthernetUDP.stop()

    EthernetUDP.stop()

    描述 中断与伺服器的连线。所有在建立 UDP 时所使用的资源都会一併丢弃。 语法 Udp.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.


  • EthernetUDP.available()

    EthernetUDP.available()

    描述 回传目前收到的封包所包含的资料量,这些资料都是目前可以读取的。要使用 available() 前必须先呼叫 UDP.parsePacket() ,否则 available() 的呼叫会失败。 available() 是从 Stream 继承而来。 语法 Udp.available() 参数 无参数 回传 int:目前可以读取的资料量,以位元组为单位 范例 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 into […]


  • EthernetUDP.endPacket()

    EthernetUDP.endPacket()

    描述 封包完成后呼叫 endPacket() 会把封包传送到 beginPacket() 指定的目的地。 语法 Udp.endPacket(); 参数 无参数 回传 无回传值 范例 函式库参考主页面 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.


  • EthernetUDP.beginPacket()

    EthernetUDP.beginPacket()

    描述 初始化 UDP 封包并指定封包欲传送至的 IP 位址及埠编号。 语法 Udp.beginPacket(remoteIP, remotePort); 参数 remoteIP:接收封包目的地的 IP 位址 remotePort:接收封包目的地的埠编号,型态为 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.


  • set_bank()

    set_bank()

    描述 是否要使用大小为 16KB 的虚拟 EEPROM (它是透过 flash 实作的)。 语法 EEPROM.set_bank(flag) 参数 flag: 在 EEPROM 函式库中,指定是否要存取 16KB 的虚拟 EEPROM (布林值)。 假如 flag = true,代表 EEPROM 函式库存取的是 16 KB 虚拟 EEPROM。假如 flag = false,就是存取 200-byte 的 CMOS 虚拟 EEPROM。预设值是 false (存取 200-byte 的 CMOS 虚拟 EEPROM)。 回传 无回传值 范例 See also - EEPROM.read() - EEPROM.write() 函式库参考主页面 The […]


  • EthernetUDP.write()

    EthernetUDP.write()

    描述 把资料写进要透过 UDP 传送的封包。write() 必须在 beginPacket() 和 endPacket() 之间呼叫,beginPacket() 会初始化 UDP 封包,初始化后我们可以透过 write() 把资料写入封包中,要传送的资料都写入封包后呼叫 endPacket() 把封包传送出去。使用 86Duino 时封包最大可达 512 位元组,如果使用的是 arduino 封包最大可达 24 位元组。 语法 Udp.write(message); Udp.write(buffer, size); 参数 message:要写入封包的资料,型态是 char 或 string buffer:存有要写入封包资讯的阵列,型态是 byte 或 char size:buffer 的大小 回传 byte:回传写入封包的位元组数量 范例 函式库参考主页 The text of the 86Duino reference is a modification of the Arduino […]


  • EthernetUDP.read()

    EthernetUDP.read()

    描述 读取透过 UDP 接收到的资料。如果没有给参数,会回传待读资料中的第一个资料。 要使用 read() 前必须先呼叫 UDP.parsePacket() ,否则 read() 的呼叫会失败。 语法 Udp.read(); Udp.read(packetBuffer, MaxSize); 参数 packetBuffer:用来存放读取资料的阵列,型态为 char MaxSize:packetBuffer 的大小,型态为 int 回传 char:回传透过 UDP 接收到的资料 范例 函式库参考主页面 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 […]