mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
Added check in case of shield not present
This commit is contained in:
@ -61,7 +61,12 @@ void printMacAddress() {
|
|||||||
void listNetworks() {
|
void listNetworks() {
|
||||||
// scan for nearby networks:
|
// scan for nearby networks:
|
||||||
Serial.println("** Scan Networks **");
|
Serial.println("** Scan Networks **");
|
||||||
byte numSsid = WiFi.scanNetworks();
|
int numSsid = WiFi.scanNetworks();
|
||||||
|
if (numSsid == -1)
|
||||||
|
{
|
||||||
|
Serial.println("Couldn't get a wifi connection");
|
||||||
|
while(true);
|
||||||
|
}
|
||||||
|
|
||||||
// print the list of networks seen:
|
// print the list of networks seen:
|
||||||
Serial.print("number of available networks:");
|
Serial.print("number of available networks:");
|
||||||
|
Reference in New Issue
Block a user