我買了一個新的ESP8266 WIFI模塊(8針)和閃存固件(從https://raw.githubusercontent.com/nodemcu/nodemcu-flasher/master/Win32/Release/ESP8266Flasher.exe)它正確使用arduino Duemilanove。 我已經經歷了許多故障排除步驟,但在復位模塊確實會給出一些亂碼響應,但沒有來自「AT」命令的Ready/OK響應。ESP8266 WIFI模塊沒有反應
模塊的紅色指示燈 一直亮着,但藍色指示燈熄滅。
採取的步驟: -
爲了提供足夠的電流i使用Beaglebone 3V3供給作爲模塊Vcc連接。 但我無法收到來自AT命令的任何迴應。
的Arduino德克薩斯(5V)已經回落到3V3使用連接到的Rx
分壓器和- 在Flash設置確保波特率爲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);
}
這裏有串行監視器 Arduino Serial Monitor Output
輸出請幫助我什麼我做錯了什麼? 我不想使用另一個FTDI芯片,而arduino已經擁有它。
以我的經驗,這種亂碼(不是靜音)是典型的不正確的串口設置:波特率,數據位,奇偶校驗,停止位。該模塊的某些文檔狀態爲「8N1」,波特率爲115200,而其他文檔(如來自sparkfun的「NURDspace Wiki(原理圖,數據表,更多!」)鏈接至[https://nurdspace.nl/ESP8266 ](https://nurdspace.nl/ESP8266),其中規定波特率爲57600.這個法文文檔[here](http://les-electroniciens.com/videos/arduino-ep16-installation-du- module-wifi-esp8266)與9600 ... ...這真的是愛好者的東西... – jbm
(以下),所以我會嘗試其他波特率,從115200(似乎並沒有工作),到57600,然後38400,19200 ,最後是9600. – jbm
我試過所有的波特率,結果都是一樣的,而且不是亂碼,奇怪的數據在重置期間只出現一次,否則它完全沒有響應,有時在測試中不是亂碼,而是一些致命異常0)或校驗和0x0000房間0尾巴8 ...種類的東西.. – aditgupta100