I have an Arduino DUE and want to connect it to an ESP8266 Board and then test the connection with a simple "AT" command on the serial command line. I have written a lot on the internet but there are so many different answers on this topic and none of them solves my issue directly.
I set up the eps8266 correctly with the two power cables. They are even comming from different power sources, so there should not be a problem with the power for the esp board.
I think the problems are somewhere in the different baud rates. If I choose 9600 Baud for the connection from the Arduino to the PC via USB and 74880 for the connection from the esp board to the DUE I at least get the error messages correctly when the esp board has to restart (when I force it).
ets Jan 8 2013,rst cause:1, boot mode:(3,6)
load 0x40100000, len 1396, room 16
tail 4 chksum 0x89 load 0x3ffe8000, len 776, room 4
tail 4 chksum 0xe8 load 0x3ffe8308, len 540, room 4
tail 8 chksum 0xc0 csum 0xc02nd boot version : 1.4(b1)
SPI Speed : 40MHz
SPI Mod
le:52mn
The code is the following:
//always high
int CH_PD_8266 = 53;
void setup() {
Serial.begin(9600);
Serial3.begin(74880); //--> at least error code is shwon correctly
// Serial3.begin(115200); //error code is gibberish
pinMode(CH_PD_8266, OUTPUT);
digitalWrite(CH_PD_8266, HIGH);
}
void loop() {
while (Serial.available() > 0) {
char a = Serial.read();
Serial3.write(a);
//Write back to see if it even comes perfect
//Serial.write(a);
}
}
void serialEvent3() {
while (Serial3.available() > 0) {
char a = Serial3.read();
// Serial.write('A');
Serial.write(a);
}
}
Any help would be really appreciated.
AT firmware
flashed into your ESP8266? If you used Arduino IDE + ESP8266 plugin to program ESP8266 directly then you overwrote theAT firmware
so it won't respond to AT commands anymore. – Chupo_cro