ATmega2560 + ESP8266

Hello everyone, need a little help over here.

I have purchased this board called "MEGA + WIFI R3 ATmega2560 + ESP8266". Here's a link to it

I'm able to upload code and run the ATmega2560 and ESP8266 individually. Now I'm having issue communicating both of it together.

This is what I'm trying to do :

  1. Connect multiple sensors to the ATmega2560. Obtain data.
  2. Upload the data obtained to ThingSpeak, which what's on my mind was using the ESP8266.

I have experienced using both board individually, and able to upload data to ThingSpeak using ESP8266.
Now the problem I faced is using this board which is the combination of both. How do I read data from ATmega2560, then transfer the data towards the ESP8266, and then upload it ? (Main problem was how do I transfer data from ATmega2560 to ESP8266)

Does anyone has experience using this board or doing similar thing? Could you please provide assistance / examples?

Thanks in advance ! :slight_smile:

you could put AT firmware in the esp8266 and use my WiFiEspAT library in ATmega. that way you would have only one sketch.

as bonus you could then add ATmega OTA upload with my ArduinoOTA library

Thanks Juraj. However, is it possible to use SoftwareSerial to communicate them? If yes, can you guide me ?
I have tried various codes, the serial communication just seems to be fail.

I tried uploaded simple code to both esp and atmega, then switching the switch to 1 2 3 4 on. Nothings seems to happen. This is the guide I followed. I have uploaded the code in reverse manner (compare to the one in the guide) because I only can connect USB to Atmega while ESP is connected to ATmega.
I have changed the pin to 15(RX3) and 14(TX3) for the Arduino code, and 3(RX) and 1(TX) for esp. Switching the dip switch to rx3 tx3.
The tutorial link is as below.
https://engineeringprojectshub.com/serial-communication-between-nodemcu-and-arduino/

smlee0511:
Thanks Juraj. However, is it possible to use SoftwareSerial to communicate them? If yes, can you guide me ?
I have tried various codes, the serial communication just seems to be fail.

I tried uploaded simple code to both esp and atmega, then switching the switch to 1 2 3 4 on. Nothings seems to happen. This is the guide I followed. I have uploaded the code in reverse manner (compare to the one in the guide) because I only can connect USB to Atmega while ESP is connected to ATmega.
I have changed the pin to 15(RX3) and 14(TX3) for the Arduino code, and 3(RX) and 1(TX) for esp. Switching the dip switch to rx3 tx3.
The tutorial link is as below.
Engineeringprojectshub.com

don't use SoftwareSerial.
you have to use Serial3

use the "CH340 connect to Mega2560 COM3 connect to ESP8266" setting