You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
/*
|
|
|
|
* Blink
|
|
|
|
* Turns on an LED on for one second,
|
|
|
|
* then off for one second, repeatedly.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <Arduino.h>
|
|
|
|
#include <WiFi.h>
|
|
|
|
#include <WiFiMulti.h>
|
|
|
|
|
|
|
|
WiFiMulti wifiMulti;
|
|
|
|
|
|
|
|
void setup()
|
|
|
|
{
|
|
|
|
Serial.begin(115200);
|
|
|
|
|
|
|
|
// initialize LED digital pin as an output.
|
|
|
|
pinMode(LED_BUILTIN, OUTPUT);
|
|
|
|
|
|
|
|
wifiMulti.addAP(WIFI_SSID, WIFI_PASSWD);
|
|
|
|
wifiMulti.addAP(WIFI_SSID2, WIFI_PASSWD2);
|
|
|
|
|
|
|
|
Serial.println("Connecting Wifi...");
|
|
|
|
if(wifiMulti.run() == WL_CONNECTED) {
|
|
|
|
Serial.println("");
|
|
|
|
Serial.println("WiFi connected");
|
|
|
|
Serial.println("IP address: ");
|
|
|
|
Serial.println(WiFi.localIP());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void loop()
|
|
|
|
{
|
|
|
|
if(wifiMulti.run() != WL_CONNECTED) {
|
|
|
|
Serial.println("WiFi not connected!");
|
|
|
|
delay(1000);
|
|
|
|
}
|
|
|
|
}
|