mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-09 22:24:14 +03:00
Added Serial open check for Leonardo to ScanNetworks example
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
created 13 July 2010
|
created 13 July 2010
|
||||||
by dlf (Metodo2 srl)
|
by dlf (Metodo2 srl)
|
||||||
modified 12 Mar 2012
|
modified 2 April 2012
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -19,8 +19,9 @@
|
|||||||
#include <WiFi.h>
|
#include <WiFi.h>
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
// initialize serial:
|
// initialize serial and wait for the port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
|
while(!Serial) ;
|
||||||
|
|
||||||
// attempt to connect using WEP encryption:
|
// attempt to connect using WEP encryption:
|
||||||
Serial.println("Initializing Wifi...");
|
Serial.println("Initializing Wifi...");
|
||||||
@@ -81,3 +82,4 @@ void listNetworks() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user