Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino snippet for simplifying WiFi connection #151

Open
ghost opened this issue Jun 9, 2015 · 0 comments
Open

Arduino snippet for simplifying WiFi connection #151

ghost opened this issue Jun 9, 2015 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 9, 2015

Got this snippet from Alex, makes code transparent with respect to password protected and non-password protected WiFi networks. We can update Arduino WiFi-examples to use this:

// Connect to Wifi network.
while (status != WL_CONNECTED) 
{
    Serial.print("Attempting to connect to SSID: ");
    Serial.println(ssid);

    if (strlen(pass) > 0)
    {
        status = WiFi.begin(ssid, pass);
    }
    else
    {
        status = WiFi.begin(ssid);
    }

    // Wait for connection.
    delay(5000);
}
@ghost ghost added the enhancement label Jun 9, 2015
@ghost ghost self-assigned this Jun 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants