mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
Added check in case of shield not present
This commit is contained in:
parent
a1fa79aa24
commit
910111abc6
@ -61,7 +61,12 @@ void printMacAddress() {
|
||||
void listNetworks() {
|
||||
// scan for nearby 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:
|
||||
Serial.print("number of available networks:");
|
||||
|
Loading…
x
Reference in New Issue
Block a user