首页 文章

ESP8266 WIFI模块无响应

提问于
浏览
1

我正确地使用arduino Duemilanove购买了一个新的ESP8266 WIFI模块(8pins)和闪存固件(来自https://raw.githubusercontent.com/nodemcu/nodemcu-flasher/master/Win32/Release/ESP8266Flasher.exe) . 我已经经历了许多故障排除步骤,但是在重置模块确实给出了一些乱码响应,但 no Ready/OK response from "AT" command .

Red LED of module is always on but Blue light is off.

Steps taken :-

  • 为了提供足够的电流,我使用Beaglebone 3V3电源作为模块Vcc . 但是我无法接收来自AT命令的任何响应 .

  • Arduino Tx(5V)使用分压器降至3v3并连接到Rx

  • 在闪存设置中,确保波特率为115200并且所有设置都正确

  • 模块工作正常,大概尝试了2个模块同样的事情

这是我的联系:

//////////////////////////////////////////////////////////////////////////////
    ///////                         CONNECTIONS              ////////
    /////////////////////////////////////////////////////////////////////////////
    /*
    ESP8266 VCC -> BeagleBone 3.3
    ESP8266 GND -> Common GND (Arduino & BeagleBone)
    ESP8266 CH_PD -> 3K resistor -> VCC
    ESP8266 RST -> VCC or pin 13(arduino)
    GPIO CAB BE LEFT OPEN OR TIED HIGH
    ESP8266 Tx -> pin2 (Arduino software serial Rx)
    ESP8266 Rx <- Voltage Divider <- pin3 (Arduino software serial Tx)
    */

这是我的代码

#define esp8266 Serial2
#define CH_PD Vcc // but needs a narrow low pulse
#define speed8266 9600 // This is the speed that worked with my ESP8266
void setup()
{
 esp8266.begin (speed8266);
 Serial.begin(9600);
 reset8266(); // Pin CH_PD need a reset before start communication
}
void loop()
{
 while(esp8266.available())
 { Serial.write(esp8266.read()); }
 while(Serial.available())
 { esp8266.write(Serial.read()); }
}
/*************************************************/
// Reset funtion to accept communication
void reset8266 ()
{
 pinMode(CH_PD, OUTPUT);
digitalWrite(CH_PD, LOW);
 delay(300);
 digitalWrite(CH_PD, HIGH);
}

这是Serial Monitor Arduino Serial Monitor Output的输出

请帮助我,我做错了什么?我不想使用另一个FTDI芯片,而arduino已经拥有它 .

1 回答

  • 1

    目前我只能给你一个部分答案(似乎我还不能评论:)) .

    启动/重置ESP时,乱码是正常的,它只是以74880波特输出启动消息的启动代码(基本上是默认波特率115200,但由于ESP以较低的CPU频率启动,波特率也是较低,启动频率为26 mhz,正常频率为40 mhz,26/40 * 115200 = 74880.如果您可以将串行客户端设置为74880波特,您应该看到该消息,但这是一个奇怪的波特率,因此可能很难或无法设定 .

    因此重置时的胡言乱语是好的!这意味着ESP工作和快乐,问题在于你的软件(正如你自己也确定的那样) .

    我假设您的代码在Arduino端?最大的问题是ESP上闪现的是什么,以及它的预期是什么 . 从你的问题我不是100%肯定你做了什么闪光...

    我想你可能已经在它上面刷了一个nodemcu,它不会响应AT命令,尝试从它上面的Espressif Systems闪现'原始'AT rom?

相关问题