Robotdyn Arduino UNO+WiFi R3 ATmega328P+ESP8266 32Mb flash

Hi,

please do someone use this Arduino with ESP ? I read somewhere you can use it all together. I have sketch that exceeds UNOs 32Kb memory (about 2.5 - 3 Kb more) and I find no way to reduce it.

I have ethernet shield + RFID reader + touch LCD. On the robotdyn.com chat someone told me I can not upload the sketch to the ESP 32MB memory and use it with Srduino. Is that really true? They sudgestet to use SD card on the LCD but I thing taht I can not use it so easily

  • first there are 4 more pins just for the SD card on the LCD (so I would need to wire those and Iam already out of most of the pins)
  • second, I read somewhere I can not use the SD and touch layer both together anyway

Maybe I coud use the SD card on the ethernet shield (I mean I can, I already tried) but I dont know how it could help. I coud save the graphics.c file there (with the pictures). That would definitly help because the file is big, but Iam not sure if I would manage to get to the 32Kb limit. I guess I cant store anything else there - like some libraries ....

Why do you have an Ethernet shield AND a WiFi shield/device?

Adding the WiFi device because it has more flash space is not going to help. The Arduino can not run code from some other device’s flash space.

Other Arduinos, like the Mega, have much more flash space than the Uno.

Thanks, I thought I could use the memory somehow... so I will buy the Mega instead. Guess thats my only option

The normal approach if you have an Arduino and a ESP is to let the ESP deal with all the WiFi & Webserver stuff and communicate over the serial ports, and let the UNO deal with whatever it has to deal with, TFT-touch & SD.

I read somewhere I can not use the SD and touch layer both together anyway

I can, but that does not leave much progmem room for anything else on an UNO usually. It depends a little on the TFT-touch (if it's built in to it, it normally can, if both are SPI there may be a conflict) So clearly state what you have (with pictures is the best !) and what you want to do with it.

Deva_Rishi:
The normal approach if you have an Arduino and a ESP is to let the ESP deal with all the WiFi & Webserver stuff and communicate over the serial ports, and let the UNO deal with whatever it has to deal with, TFT-touch & SD. I can, but that does not leave much progmem room for anything else on an UNO usually. It depends a little on the TFT-touch (if it’s built in to it, it normally can, if both are SPI there may be a conflict) So clearly state what you have (with pictures is the best !) and what you want to do with it.

Ok I get it now, I dont need wifi. I need the ethernet cable connection, thats why I have ethernet shield on top of UNO. With that Iam using also RDM6300 reader and 240x320 color LCD TFT 2.4" touch display - see attached images.

Basicaly what I need is draw 6 buttons on the touch screen. Then there is the tag reader, if you bring a tag close to the reader it will read the ID of the tag. Then it will run ethernet connection to the API (based on fact if you press some button or not it will send different http request), get and parse json renspose from API and display message on the LCD.

It works if I get rid of #include “graphics.c” - its 6 pictures 64x64px for the buttons (with code like PROGMEM ={0x00, 0x00, 0x01, 0xff, 0xff…). But I need those images. Without them there is no way to know what button is what (the text is not very readable inside 100x100 button).

So I guess Arduino Mega is really my only option. The code with those images use 34772 bytes.

A Mega would be the simplest solution.

Hi
so I have finaly the Mega, but seems there is some problem, when I just change the Uno for Mega (and change the upload board/procesor and port) - so put the ethernet shield on Mega and upload the sketch the LCD dont work. I wonder why is that. Do I need to rewire it and change some pins on the ethernet shield or...?

and upload the sketch the LCD dont work. I wonder why is that.

Well, I wonder what sketch you loaded...

Do I need to rewire it and change some pins on the ethernet shield or...?

Probably.

We can't see what you have connected to the Mega, now, or where. The SPI pins are in a different place. The I2C pins are in a different place.

Iam using "Adafruit_ILI9340.h" and "XPT2046_Touchscreen.h" libraries, with UNO I had pins defined like this:

#define SHIELD_ETHERNET 10
#define LCD_cs 1
#define LCD_dc 6
#define LCD_rst 8
#define DOTYK_cs 7
#define LCD_MOSI 11
#define LCD_SCLK 13
#define LCD_MISO 12

with UNO I had pins defined like this:

You'll need to look up what the proper values are for the Mega. They are not hard to find.

Ok thanks, seem Mega 2560 has pins 50, 51 and 52 (MISO, MOSI, CLK). It works now.