描述 取得 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. […]
描述 中断 WiFi Shield 目前的连线。 语法 WiFi.disconnect(); 参数 无参数 函式库参考主页面 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.config() 用来设定 IP 位址、 DNS、闸道(gateway)、子网路遮罩(subnet)。 不像是 WiFi.begin() 会自动设定这些资讯,WiFi.config() 让使用者可以手动的设定。 在呼叫 WiFi.begin() 之前呼叫 WiFi.config(),使得 begin() 使用 config() 的设定值去设定网路。 如果是先呼叫 WiFi.begin() 再呼叫 WiFi.config(),在 begin() 执行时预设使用 DHCP 连线,一旦呼叫 config() 后,会使用输入的参数重新设定网路。 语法 WiFi.config(ip); WiFi.config(ip, dns); WiFi.config(ip, dns, gateway); WiFi.config(ip, dns, gateway, subnet); 参数 ip:IP 位址,型态为 4 个位元组的阵列 dns:DNS 伺服端的 IP 位址 gateway:闸道的 IP 位址,型态为 4 个位元组的阵列。可以不填这个参数,预设的位址前三个数值会与 IP 位址相同,而最后一个数值会设为 […]
描述 WiFi.setDNS() 用来设定 DNS(Domain Name System) 伺服器。 语法 WiFi.setDNS(dns_server1) WiFi.setDNS(dns_server1, dns_server2) 参数 dns_server1:主要的 DNS 伺服器 dns_server2:备用的 DNS 伺服器 回传 无回传值 范例 示范如何把 DNS 设定为 Google 提供的 DNS(8.8.8.8) 函式库参考主页面 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 […]
描述 取得目前无线网路的 SSID。 语法 WiFi.SSID(); WiFi.SSID(wifiAccessPoint) 参数 wifiAccessPoint:指定要取得资讯的无线网路 回传 string:无线网路的 SSID 范例 函式库参考主页面 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.
描述 取得连线到的路由器的 MAC 位址。 语法 WiFi.BSSID(bssid); 参数 bssid:bssid 是一个大小为 6 位元组的阵列,BSSID 执行完后,会把路由器的 MAC 位址放到 bssid 裡 回传 无回传值 范例 函式库参考主页面 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.RSSI(); WiFi.RSSI(wifiAccessPoint); 参数 wifiAccessPoint:指明要取得讯号强度的无线网路 回传 long:信号强度(RSSI),单位为 dBm 范例 函式库参考主页面 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.