Using the Wemos D1 WiFi module purely as a WiFi shield with the Mega 2560

I have with me a Mega 2560 board and a Wemos D1 board(The board on the right side) |500x500.

I intend to use the Wemos board purely as a WiFi shield for the Mega 2560 board as I need more digital/PWM pins than that provided by the Wemos board. I need some clarifications on the following two points:

  • Is there any way I can do this? All my searches have only resulted in people using the Wemos D1 as a WiFi enabled Uno board and this cannot be used for my project. Can someone please provide the schematics or pin connections for the interfacing of the two boards and simple code example.

  • If there is no way to use the Wemos D1 as a Wifi shield I might consider using the WiFi101 shield. Would that be a good option?

No experience with either board. But I’m sure you can use e.g. serial comms to communicate between the two boards. Write some code for the wemos to read data coming from the mega and send that over wifi; same thing for receiving over wifi and passing to the mega.

SPI or I2C may also be options, I do not know what the wemos supports.

The most common way to do this is to install the AT firmware on the ESP8266, then communicate between the two boards using serial. This option will provide you with the most available libraries, example code, and tutorials.

I think another option is ESP-Link: I don't have any experience with that firmware. I don't see it mentioned much here.

There may be some other options. It looks like this might be what runs on the Uno WiFi: I don't know what relation that might have to the ESP-Link mentioned above and a quick read of the documentation doesn't say.

Then you have the option of writing your own custom firmware for the ESP8266. Sounds like a lot of work when there are already firmwares available but maybe you could make something better for your application or just like doing your own thing.

Thanks sterretje and pert,

Looks like communication between boards is the only thing I can use at the moment.

Well if you figure out which approach you want to take and need some help doing it then let us know and someone will likely be able to provide some assistance. I only have experience with the AT firmware but may be able to offer general advice on other options.