|
WeMos D1 上传代码后使用不了,串口监视器一直不停的滚动
代码如下:
[mw_shl_code=arduino,true]/*
This sketch demonstrates how to scan WiFi networks.
The API is almost the same as with the WiFi Shield library,
the most obvious difference being the different file you need to include:
*/
#include "ESP8266WiFi.h"
void setup() {
Serial.begin(115200);
// Set WiFi to station mode and disconnect from an AP if it was previously connected
WiFi.mode(WIFI_STA);
WiFi.disconnect();
delay(100);
Serial.println("Setup done");
}
void loop() {
Serial.println("scan start");
// WiFi.scanNetworks will return the number of networks found
int n = WiFi.scanNetworks();
Serial.println("scan done");
if (n == 0) {
Serial.println("no networks found");
} else {
Serial.print(n);
Serial.println(" networks found");
for (int i = 0; i < n; ++i) {
// Print SSID and RSSI for each network found
Serial.print(i + 1);
Serial.print(": ");
Serial.print(WiFi.SSID(i));
Serial.print(" (");
Serial.print(WiFi.RSSI(i));
Serial.print(")");
Serial.println((WiFi.encryptionType(i) == ENC_TYPE_NONE) ? " " : "*");
delay(10);
}
}
Serial.println("");
// Wait a bit before scanning again
delay(5000);
}[/mw_shl_code]
串口监视器如下:
3ffffe60: 74656278 feef0061 feefeffe feefeffe
3ffffe70: feefeffe feefeffe feefeffe feefeffe
3ffffe80: 7868636d 61746562 35313031 40204a00
3ffffe90: 3ffe8765 00000000 61746562 40204ac1
3ffffea0: 3ffe875c 005cc89a 00003c00 3ffee7d4
3ffffeb0: 40203264 3ffee758 3ffe8763 40203270
3ffffec0: 76b04000 00f8f4c2 0000001e ffffffff
3ffffed0: 5041474e 3fffef00 40203d60 00000000
3ffffee0: 00000000 00000000 00000000 fffffffe
3ffffef0: 6968636d 7978686c 616e0000 40204ac1
3fffff00: 3ffe875d 00000000 5041474e 40204ac1
3fffff10: 3ffe8754 0ce3b0c2 00003900 3ffee7d4
3fffff20: 40203264 3ffee758 3ffe875b 40203270
3fffff30: 40203200 3ffee758 3ffe8781 00000002
3fffff40: 00000004 00000000 3ffee720 00000001
3fffff50: 3ffe84c8 00000000 3ffee758 3ffee7d4
3fffff60: 3ffe84c8 3ffee720 3ffee758 40201101
3fffff70: 0001c200 0000001c 00000000 feefeffe
3fffff80: 3fffdad0 00000000 3ffee794 4020124f
3fffff90: feefeffe feefeffe feefeffe feefeffe
3fffffa0: feefeffe feefeffe 3ffee794 40203d78
3fffffb0: feefeffe feefeffe 3ffe84e8 40100bf5
<<<stack<<<
ets Jan 8 2013,rst cause:2, boot mode3,6)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
|
|