So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By barth
#64822 I have same problem, if I use this code with Arduino Due

#define Serial_ESP Serial3
#define Serial_Debug Serial
// 12 - RST
// 18 CH-PD
// 11 GPIO0


void setup()
{
Serial_ESP.begin(115200);
Serial_Debug.begin(115200);

pinMode(18, OUTPUT);
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);

digitalWrite(12, HIGH);
digitalWrite(18, HIGH);
//digitalWrite(11, HIGH);
delay(1); //max 15-17
digitalWrite(11, LOW);
delay(1); //max 15-17
//delayMicroseconds(600);
delayMicroseconds(600);
digitalWrite(12, LOW);
delayMicroseconds(600);
digitalWrite(12, HIGH);
}

void loop()

{
if (Serial_ESP.available()) {
Serial_Debug.write(Serial_ESP.read());
}
Serial_Debug.flush();

if (Serial_Debug.available()) {
Serial_ESP.write(Serial_Debug.read());
}
Serial_ESP.flush();
}


Every think works fine - I can upload ESP with ESP Upload Tools - not directly from Arduino IDE! But it is not problem - You have to do compilatin and take hex file from TEMP directory


The problem is when I have use it for Arduino Mega 2560 - comunikation of course is - I can send data to ESP and take it to cpu - but upload hex file to ESP is imposible - I change boude speed and nothing :(

I somebody have any solution why on Due can do upload , on MEG not? Is hadware serial in Mega is other like DUE?

On FDTI also I Can load hex file, but it is not solution for me - I don't wona unconnect Esp module for programing each time...when I do any change in code ...