Home Page | Language Reference (extended) | SD Reference | Libraries | Comparison | Changes
Initializes the WiFi101 library's network settings and provides the current status.
WiFi.begin();
WiFi.begin(ssid);
WiFi.begin(ssid, pass);
WiFi.begin(ssid, keyIndex, key);
ssid: the SSID (Service Set Identifier) is the name of the WiFi network you want to connect to.
keyIndex: WEP encrypted networks can hold up to 4 different keys. This identifies which key you are going to use.
key: a hexadecimal string used as a security code for WEP encrypted networks.
pass: WPA encrypted networks use a password in the form of a string for security.
#include <WiFi101.h>
//SSID of your network
char ssid[
]
=
"yourNetwork"
;
//password of your WPA Network
char pass[
]
=
"secretPassword"
;
void
setup
(
)
{
WiFi.begin
(ssid, pass)
;
}
void
loop
(
)
{
}
Corrections, suggestions, and new documentation should be posted to the Forum.
The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.