Programming an esp8266-07 via the arduino mega 2560

Hi ll,

I have just been trying to upload a sketch to the esp8266-07 device whilst it was fully connected to the arduino mega but it won’t upload the code with an error regarding communication.

Everywhere I have turned suggests it’s much easier using a esp8266 usb to serial adapter and so I have bought some so that I can program it directly.

However, is there a way to program the esp8266 module via the arduino or will the IDE development program only see the arduino? TX and RX of the esp are connected to RX1 and TX1 respectively on the arduino leaving tx0 and rx0 to be used for the serial monitor on the computer.

Or do I have to plug it in directly via USB adapter?

However, is there a way to program the esp8266 module via the arduino or will the IDE development program only see the arduino?

Yes, The IDE will see the Arduino, not the ESP.

TX and RX of the esp are connected to RX1 and TX1 respectively on the arduino leaving tx0 and rx0 to be used for the serial monitor on the computer.

There is no way that that will work for uploading code to the ESP.

Or do I have to plug it in directly via USB adapter?

Yes, use the TTL to USB adapter and connect direct to PC.

Thank you that confirms things enough for me!

Si