I'm thinking of buying an Arduino WEMOS1 as I am tired with SD card fiddling.

Arduino WEMOS

As the ESP8266 chip has 32 Mb (~4 MB) flash memory, I am hoping to be able to push most of the G-code files over the Wi-Fi.

I was trying OctoPi but, having electronic noise issues, the transmission was not stable.

Has anyone tried WEMOS with RAMPS? Is the serial communication stable between ESP and Arduino?

1 Product description is Mega +WiFi R3 ATmega2560+ESP8266 (32Mb memory), USB-TTL CH340G. Compatible for Arduino Mega, NodeMCU, WeMos ESP8266

  • 1
    $\begingroup$ You might have confused RAM with Flash memory. The ESP8266-12 as used in that board has about 50 kb of RAM available. $\endgroup$ – Klaus D. Jul 8 '18 at 3:01
  • $\begingroup$ That is correct, will edit question. $\endgroup$ – profesor79 Jul 8 '18 at 7:53
  • $\begingroup$ you also confuse units: the ESP has ~3MB of storage to use, not 32. the 32 figure is Mb (megabits) and your program takes up about a meg as well. $\endgroup$ – dandavis Jul 8 '18 at 20:50
  • $\begingroup$ @dandavis thanks for that - that is taken from the specs I found. Anyway if it is 3MB or 32Mb my question is still valid as I was planning to use SD card for storage. $\endgroup$ – profesor79 Jul 9 '18 at 8:17
  • 2
    $\begingroup$ I don't know about RAMPS in particular, but ESP -> Arduino serial communication is extremely reliable; I have a few devices with such a setup and they have well under 1 ppm error long-term $\endgroup$ – dandavis Jul 9 '18 at 20:03

After having looked into them, these boards certainly seem to be rather interesting.

There appear to be two varieties of this board, as I have seen photos with either RobotDyn:

RobotDyn board

rear (from Instructables)

RobotDyn board (rear)

or WeMos logos on them.

WeMos board

They may, or may not, be the same. There is also this one, with just a generic "WiFi" logo (from the eBay page below):

Generic board

Memory Discrepancies

However, there is certainly some discrepancy relating to the specification and amount of memory (unless there are a number of variants - which would certainly be possible):

Looking at this article, Instructables - Arduino MEGA 2560 With WiFi Built-in - ESP8266, it isn't exactly the ESP8266-12:

In today's text, we discuss an Arduino that I consider extremely special, as it has an ESP8266 embedded in its board. It doesn’t have the ESP12 soldered onto the board. Instead, it has the Espressif chip. So, on the board you have the built-in Tensilica chip with 4MB of memory, along with the ATmega2560, which is the traditional Arduino Mega.

So the ESP has 4 MB, but where does the 32 Mb come in to play?

Well, looking at this RobotDyn memory table (taken from the Instructables page):

RobotDyn memory table

The 4 MB of the ESP appears to have been immediately contradicted and upgraded to 8 MB! The ATmega2560 somehow has 32 Mb (which seems a bit of a lie - as there isn't an ATmega2560 known to man that has that much memory2), and is confused further by the corresponding text:

As we see in the table above, the ATmega has 32MB of memory, not counting the ESP memory. This is wonderful, since the traditional Mega Arduino has only 256kb of memory.

So MB or Mb? Is there an additional flash IC external to the ATmega2560? Looking at the schematic, taken from the Russian RobotDyn page, there doesn't appear to be:

RobotDyn schematic

So this could be nonsense. Logic would dictate that the ATmega has 256 kB and the ESP has 4 MB... But I could be wrong..?

Links from Контроллер RobotDyn Mega 2560 R3 + WiFi ESP8266b, flash память 8Mbit, USB-TTL CH340G, MicroUSB:

Reliability of communication

Regardless of the actual spec, to address your question of ESP/Arduino communication reliability:

As the ESP8266 and the ATmega2560 are on the same board one would assume that the (serial) communication between the two would be faultless. However, some issues have been reported3.

Nevertheless, from your question, it seems that you were having issues with the ESP to the OctoPi communication, rather than ESP to Arduino, so maybe this doesn't actually answer your question.

Also, as to their compatibility with RAMPS, there is very little information available currently, and it would seem to be a case of try-it-and-see. The closest I got was this post on the thread, OnStep and RAMPS1.4, but it seems to be spam.

However, it certainly sounds worth a gamble as it would be a nice combination of technologies. However, I would imagine that some modification of the firmware would be necessary.

Useful Notes

  • From post #8 of Mega + WiFi R3 ATmega2560 + ESP8266 (8 Mb mémoire)

To upload the sketch to the board:

5, 6, 7 ON
RXD3 - TXD3   

To run the sketch:

5 and 6 ON


1 From WeMOS Mega + WiFi R3 ATmega2560 + ESP8266 USB-TTL For Arduino Mega NodeMCU

WeMOS Mega + WiFi R3 ATmega2560 + ESP8266 USB-TTL For Arduino Mega NodeMCU  


  • Full integration on one board: Mega R3 ATmega2560 and WiFi ESP8266 with memory 32Mb (megabyte)
  • All of the modules can work together or each separately. And everyone has their own pinout headers
  • The convenient solution for the development of new projects requiring Uno and WiFi

  • Via USB you can update sketches and firmware for ATmega2560 and for ESP8266. For this on board have the USB-serial converter CH340G

  • Use this board is very simple
  • The board has DIP-switch, to connect the modules. For example to:
    • USB and ATmeg2560,
    • USB and ESP8266,
    • ATmega2560 and ESP8266

Table DIP- Switch:

Connection                                                          DIP
                                           1        2        3         4       5         6        7
ATmega2560<->ESP8266                      ON       ON       OFF       OFF     OFF       OFF      OFF
USB <->ATmega2560                         OFF      OFF      ON        ON      OFF       OFF      OFF
USB<->ESP8266 (Update firmware or sketch) OFF      OFF      OFF       OFF     ON        ON       ON
USB<->ESP8266 (communication)             OFF      OFF      OFF       OFF     ON        ON       OFF
All independent                           OFF      OFF      OFF       OFF     OFF       OFF      OFF

Special solution:
USB <->ATmega328<-> ESP8266
Connection                                                          DIP                                     SWITCH 2
                                           1        2        3         4       5         6        7

USB <-> ATmega2560<-> ESP8266             ON       ON       ON        ON      OFF       OFF      OFF         To RXD3/TXD3
  • USB converter CH340G connect to RX0/TX0 of ATmega2560
  • ESP8266 connect to RX3/TX3 of ATmega2560

Size: 10.5x5.3cm/4.13x2.09inch

2 From the Atmel ATmega640/V-1280/V -1281/V-2560/V-2561/V datasheet

ATmega256 memory

3 From Mega + WiFi R3 ATmega2560 + ESP8266 (8 Mb mémoire), there do appear to be some issues communicating between the ATmega and the ESP ICs, with a number of users reporting problems.

However, a couple of solutions are provided:

Solution 1

From post #2

  1. Set the DIP switch to "special" mode: (1=on, 2=on, 3=on, 4=on, 5=off, 6=off, 7=off, 8=off) see the the description of the product.

  2. Set the switch in RXD3

  3. Run the below sketch, change the SSID and PASSWORD values. this is just to test that Arduino and ESP8266 are working together. The code originated from BISSA ORBOEA in Element14.


#include "ESP8266.h"

#define SSID        "YOURSID"

ESP8266 wifi(Serial3,115200);

void setup() {



  Serial.println("FW Version:");

    if (wifi.setOprToStation()) {
        Serial.println("OprToStation ok");    }
        else {
        Serial.println("OprToStation  err");

    if (wifi.joinAP(SSID, PASSWORD)) {
        Serial.println("Join AP success");

        Serial.println( wifi.getLocalIP().c_str());      
    } else {
        Serial.println("Join AP failure");

void loop()

Solution 2

From post #6

First you need to write the code for each board according your application, but in your code you need to establish a commmincation between serial port of Atmega and ESP in both code, again in according you application. Finally, put the switches which make the intenal interconnection between both.

For example, I made a code for ESP to connect in an Access Point and put on a TCP server. When a wireless client is connected in ESP and consequently in the TCP Server, all data send by client I redirect to the serial port. As serial port of ESP is connected with serial 3 of the Atmega, the code in Atmega pass to theat the data from serial 3.

Solution 3

From post #11

Follow this if you have the same to my cases:

  1. programm to the ESP(upload sketch) for wifi connection by configure the DIP to 5:on,6:on,7:on and other off.
  2. program to mega(upload sketch) in case you want to send communication to each other by configure Dip to 3:on,4:on, and other off.
  3. switch two RX0/TX0(in my case I use Serial.print() and Serial.readString() for communicate between Esp and Mega)
  4. after you already upload sketch to both Modules you can test communication between them by configure DIP to: 1:on,2:on,3:on,4:on. and then press Reset Button to restart the boards.

  5. In ESP you can get the string from Mega by if(Serial.available()) Serial.readString(); and In mega you can get data from ESP by : if(Serial.available())Serial.readString().

  6. After you got a string so you can split or do anything whatever you want.
  7. If you want send data to Firebase you must use the Firebase Library at the Esp side, in Mega it not support.
  • $\begingroup$ thanks a lot for that compilation. will buy one and see how it works. $\endgroup$ – profesor79 Jul 31 '18 at 21:04
  • $\begingroup$ Yeah, I want to get one. I've just updated my answer with a reasonably accurate sounding description. I will continue to look for a RAMPS use case. $\endgroup$ – Greenonline Jul 31 '18 at 21:05
  • $\begingroup$ Great post, you want to make me buy that board! :D $\endgroup$ – 0scar Aug 1 '18 at 6:57
  • $\begingroup$ @0scar - The trouble is that the documentation seems to be lying about the memory, and there is not one clear description. There also seems to be two varieties. RobotDyn and WeMos - although they may be exactly the same $\endgroup$ – Greenonline Aug 1 '18 at 7:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.