mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-20 21:01:25 +03:00
Updated ScanNetworks examples to make sure scanning happened after wifi.Begin()
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
|
||||
created 13 July 2010
|
||||
by dlf (Metodo2 srl)
|
||||
modified 15 Sep 2011
|
||||
modified 10 Jan 2012
|
||||
by Tom Igoe
|
||||
*/
|
||||
|
||||
@ -28,13 +28,14 @@ void setup() {
|
||||
// initialize serial:
|
||||
Serial.begin(9600);
|
||||
|
||||
// scan for existing networks:
|
||||
Serial.println("Scanning available networks...");
|
||||
scanNetworks();
|
||||
|
||||
// attempt to connect using WEP encryption:
|
||||
Serial.println("Attempting to connect to open network...");
|
||||
status = WiFi.begin(ssid);
|
||||
|
||||
// scan for existing networks:
|
||||
Serial.println("Scanning available networks...");
|
||||
scanNetworks();
|
||||
|
||||
Serial.print("SSID: ");
|
||||
Serial.println(ssid);
|
||||
|
Reference in New Issue
Block a user