完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
我不确定哪个论坛是正确的,所以我决定将其发布在“一般讨论”中。
我使用 Arduino IDE 1.8.5 已经有一段时间了。 两年来,我一直在使用 ESP8266 (NodeMCU) 来控制我的智能家居的各个部分。昨天有一个百叶窗没有放下,我发现 ESP8266 没有设置输出到继电器。所以我决定换一个新的。但是:当我将(旧)草图下载到 NodeMCU 时,我既无法连接到 WIFI,也无法从串行监视器中获得任何有用信息。串行连接 (Serial.begin) 设置为 115200,监视器也是如此。我可以使用我喜欢的任何波特率,我只会得到垃圾。除此之外,WIFI 不连接。 最后我用了一个非常简单的草图来检查连接: 代码:全选#include const char* ssid = "******"; // The SSID (name) of the Wi-Fi network you want to connect to const char* password = "******"; // The password of the Wi-Fi network void setup() { Serial.begin(115200); // Start the Serial communication to send messages to the computer delay(10); Serial.println('n'); WiFi.mode(WIFI_STA); WiFi.begin(ssid, password); // Connect to the network Serial.print("Connecting to "); Serial.print(ssid); while (WiFi.status() != WL_CONNECTED) { // Wait for the Wi-Fi to connect delay(500); Serial.print('.'); } Serial.println('n'); Serial.println("Connection established!"); Serial.print("IP address:t"); Serial.println(WiFi.localIP()); // Send the IP address of the ESP8266 to the computer } void loop() { } 这确实告诉我连接被拒绝了。这确实发生在两个不同的接入点(路由器和 Raspberry)上。 知道出了什么问题吗? |
|
相关推荐
|
|
只有小组成员才能发言,加入小组>>
944 浏览 0 评论
1671 浏览 0 评论
请问一下我想用ESP8685直接替换ESP8266而不用写程序,可以让ESP8685直接通过之前ESP8266的外挂的flash运行程序吗
1330 浏览 1 评论
1233 浏览 1 评论
5015 浏览 2 评论
为blufi_device设置自定义名称,但是无法修改,为什么?
1250浏览 4评论
请问ESP32-S2-WROOM怎么获得ESP32-S2外接FLASH的唯一序列号?
927浏览 3评论
2329浏览 3评论
ESP-IDF的VScode插件的build按钮点击会报错的原因?
2525浏览 3评论
ESP-Jumpstart例程中第5个工程:5_cloud连接报错是哪里的问题?
1051浏览 2评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-1 19:24 , Processed in 0.618461 second(s), Total 68, Slave 53 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
500
