#include "WiFi.h"
void
setup()
{
Serial.begin(115200);
// Set WiFi to station mode and disconnect from an AP if it was pre
viously connected
WiFi.mode(WIFI_STA);
WiFi.disconnect();
delay(100);
Serial.println("Setup
}
void
loop()
{
Serial.println("scan
// WiFi.scanNetworks will return the number of networks found
int
n
=
WiFi.scanNetworks();
Serial.println("scan
(n
==
0) {
if
Serial.println("no networks
} else {
Serial.print(n);
Serial.println("
(int
for
// Print SSID and RSSI for each network found
Serial.print(i
Serial.print(":
Serial.print(WiFi.SSID(i));
Serial.print(" (");
Serial.print(WiFi.RSSI(i));
Serial.print(")");
Serial.println((WiFi.encryptionType(i)
":"*");
delay(10);
}
}
Serial.println("");
// Wait a bit before scanning again
delay(5000);
}
done");
start");
done");
networks
i
=
0;
i
<
n; ++i) {
+
1);
");
found");
found");
==
WIFI_AUTH_OPEN)?"
Need help?
Do you have a question about the AtomU and is the answer not in the manual?