与ESP8266通过SerialMonitor通信

huangapple go评论45阅读模式
英文:

Communicating with ESP8266 via SerialMonitor

问题

我遵循了这个教程,在那里我能够一直跟进,直到我需要通过Arduino IDE的串行监视器进行通信的时候。

这意味着我能够:

  • 有正确的连线
  • 能够通过ESP8266“刷写”一些代码

而这意味着我无法:

  • 通过Arduino IDE的串行监视器发送AT指令。

我发送的消息都附加了NL和CR,并且我使用了115200的波特率进行通信。

此时我不知道还能尝试什么...我该如何进一步调试这种情况?

英文:

I was following this tutorial where I could follow everything up until point when I needed to communicate via the Serial Monitor of the Arduino IDE.

This means that I was able to:

  • Have the correct wiring
  • Being able to 'flash' some code to the ESP8266

And this means that I was unable to:

  • Send AT commands via the Serial Monitor with the Arduino IDE.

The messages that I send are appended with both NL & CR, and I use a baudrate of 115200 for the communication.

At this point I am at a loss what else I can try... how can I further debug something like this?

答案1

得分: 1

如果你认为你已经正确烧录了ESP,请在你的网络中看到它作为一个节点。
从那里开始。

如果你在你的网络上看不到它作为一个节点,那么你没有成功完成前几个步骤。

另一个问题可能是时序。将Arduino的波特率保持在最大速度接收。关闭它们两个。首先打开Arduino - 等待几秒钟。Arduino启动后不会立即运行接收代码。几秒钟后,打开ESP的电源。你可能不会看到你期望的文本,但至少应该看到乱码。

如果你看到了乱码,你需要选择正确的波特率,使Arduino与ESP匹配,并将它们配对启动。

如果你看不到乱码,请检查你的连线。如果你对你的连线感到有信心,那么购买一个新的ESP,因为你可能在最近的过去中因为糟糕的连线而烧坏了它。

英文:

If you think you properly flashed the ESP, you should be able to see it as a node in your network.
Start there.

If you do not see it as a node on your network, you did NOT successfully complete the first few steps.

The other issue might be timing. Keep the baud rate at the max speed on the arduino for receive. turn them both off. turn the Arduion on first - wait a couple seconds. The rduino is not running the receive code the instant it boots. After a few seconds, power on the ESP. You may not see the text you expect, but you should at least see goobly-gook.

If you do see goobly-gook, you will need to pick the right baud rate so the arduino matches the ESP, and boot them as pairs.

If you do not see goobly-gook, check your wiring. If you are confident in your wiring, buy a new ESP as you likely burnt it out in the recent past with bad wiring 与ESP8266通过SerialMonitor通信

答案2

得分: 0

如果您刷入了您链接的教程中的代码,您将无法向模块发送AT命令,因为它未运行AT固件。该模块仅响应AT命令,因为它正在运行使其执行该操作的程序。如果已安装AT固件,则在从教程中刷入代码时已覆盖它。

如果您希望使用AT命令,您需要刷入AT固件。请注意,最新版本不支持ESP8266,因此您需要按照README中的说明使用较旧的版本。

英文:

If you flashed the code in the tutorial you linked to, you wouldn’t be able to send AT commands to the module because it’s not running AT firmware. The module only responds to AT commands because it’s running a program that makes it do that. If the AT firmware was installed, you overwrote it when you flashed the code from the tutorial.

If you want to use AT commands with it you’ll need to flash the AT firmware. Note that the most recent versions don’t support the ESP8266, so you’ll need to follow the instructions in the README to use an older version.

huangapple
  • 本文由 发表于 2023年6月12日 04:36:19
  • 转载请务必保留本文链接:https://go.coder-hub.com/76452427.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定