描述 传送资料到目前与伺服端连线的所有用户端。当要传送的资料为数字时,每一位数会被拆开来并各自被当作字元(例:如果要送的资料为 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 […]
描述 传送资料到目前与伺服端连线的所有用户端。 语法 server.write(data) 参数 data:要传送到用户端的资料,型态可以为 byte 或 char 回传 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 domain.
描述 取得一个与伺服端连线并且有资料要传送给伺服端的用户端。这个用户端的连线并不会因为 Client 物件解构而中断,如果要中断连线可以呼叫 client.stop()。 available() 是从 Stream 继承而来。 语法 server.available() 参数 无参数 回传 Client:如果没有连线中的用户端或是连线中的用户端都没有资料可以读取,这个回传的 Client 物件等同于 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.
描述 启动伺服端,让伺服端开始监听连线请求。 语法 server.begin() 参数 无参数 回传 无回传值 范例 函式库参考主页面 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.
描述 创建一个伺服端,这个伺服端会监听指定的埠是否有连线的请求。 语法 WiFiServer server(port); 参数 port:要监听的埠编号,型态为 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.
描述 Server 类别实作伺服端的功能,让 86Duino 可以成为伺服端。 函式库参考主页面 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.
描述 取得 WiFi Shield 闸道(gateway)的 IP 位址。 语法 WiFi.gatewayIP(); 参数 无参数 回传 IPAddress:WiFi Shield 闸道的 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.
描述 取得 WiFi Shield 的子网路遮罩(subnet mask)。 语法 WiFi.subnet(); 参数 无参数 回传 IPAddress: WiFi Shield 的子网路遮罩 范例 函式库参考主页面 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.
描述 取得 WiFi Shield 的 IP 位址。 语法 WiFi.localIP(); 参数 无参数 回传 IPAddress:WiFi Shield 的 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.
描述 初始化 WiFi 函式库并回传目前的网路状态。 语法 WiFi.begin(); WiFi.begin(ssid); WiFi.begin(ssid, pass); WiFi.begin(ssid, keyIndex, key); 参数 ssid:欲连线的无线网路的 SSID keyIndex:使用 WEP 加密的无线网路可以储存 4 组不同的钥匙,keyIndex 用来指示要使用的钥匙 key:连线到 WEP 加密的无线网路时使用的钥匙 pass:连线到 WPA 加密的无线网路时使用的密码 回传 -WL_CONNECTED:连线至网路 -WL_IDLE_STATUS:没有连线至网路,处于待命状态 范例 函式库参考主页面 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. […]