1
0
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:
Mimmo La Fauci
2012-05-26 12:06:14 +02:00
parent a1fa79aa24
commit 910111abc6

View File

@ -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:");