Skip to content

Instantly share code, notes, and snippets.

@alistairjevans
Created May 26, 2019 09:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alistairjevans/78e609666868874c42bc612f9fb74554 to your computer and use it in GitHub Desktop.
Save alistairjevans/78e609666868874c42bc612f9fb74554 to your computer and use it in GitHub Desktop.
Simple WiFi connection
#include <WiFiNINA.h>
#define NETSSID "MYNETWORK"
#define NETPASS "SECRETPASSWORD"
WiFiClient client;
void setup()
{
Serial.begin(9600);
// Start connecting...
WiFi.begin(NETSSID, NETPASS);
// Give it a moment...
delay(5000);
if(WiFi.status() == WL_CONNECTED)
{
Serial.println("Connected!");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment