Arduino AVR vs Arduino processor

Hello everyone I gathered this simple information and i am open and grateful for any suggestions or corrections. I used arduino UNO for some projects,after some time I needed a bigger RAM to hold objects and so on,i found arduino YUN that have 2.5k of SRM and 64m of RAM!! My questions are: 1) which states will let me use 64m? How to configure it ? Same goes for 2.5k 2) if YUN could operate on operating system (the default one) ,how much of ram it will use ? 3) if YUN is not what i need in term of RAM,what board could help me

Yun has the same Armega 32u4 as Leonardo. The Atheros processor on Yun doesn't 'run Arduino' it has an operating system based on OpenWRT (system for networking devices like routers and WiFi Access Points)

If you need more memory, use Arduino Mega or some Arduino SAMD board.

if Uno form factor is required, Zero and M0 are SAMD boards with Uno pinout. You can buy an Atmega1284p board in Uno format or the chip on Uno r3 can be replaced with 1284p in adapter.

Seedstudio has a Mega with Uno size. Robotdyn has Mega Mini, an ATmega2560 on board with size of a Nano.

Juraj: If you need more memory, use Arduino Mega with 256 kB flash memory or some Arduino SAMD board.

i think you misunderstand me !, what i mean by Memory is RAM or what it called SRAM in arudino , i have no problem with flash memory since it hold the sketch , i have a problem with running code , to be more clearly , i have a queue that hold objects,each object is of size more than 20 byte ! and this queue is expanding in run-time

Juraj: Yun has the same Armega 32u4 as Leonardo. The Atheros processor on Yun doesn't 'run Arduino' it has an operating system based on OpenWRT (system for networking devices like routers and WiFi Access Points)

does that mean i can't use this 64m for other purposes ?

TheNoneP: i think you misunderstand me !, what i mean by Memory is RAM or what it called SRAM in arudino , i have no problem with flash memory since it hold the sketch , i have a problem with running code , to be more clearly , i have a queue that hold objects,each object is of size more than 20 byte ! and this queue is expanding in run-time

Mega2650 has 8kB of RAM. The top from ATmega family is ATmega1284P with 16kB (see my sign). The 2560 is able to use extended memory, read this: http://andybrown.me.uk/2011/08/28/512kb-sram-expansion-for-the-arduino-mega-design/. He offers also a shield.

does that mean i can't use this 64m for other purposes ?

Yes, it does.

TheNoneP: i think you misunderstand me !, what i mean by Memory is RAM or what it called SRAM in arudino , i have no problem with flash memory since it hold the sketch , i have a problem with running code , to be more clearly , i have a queue that hold objects,each object is of size more than 20 byte ! and this queue is expanding in run-time

sorry I copied from my answer to someone who needed more flash. but the mentioned MCUs have more SRAM too

Budvar10:
read this: http://andybrown.me.uk/2011/08/28/512kb-sram-expansion-for-the-arduino-mega-design/. He offers also a shield.

what if i don’t want a shield and preferring to use a READY Arduino with more SRAM ? if my question is ok, what kind of arduino could help me ?

there is a lot arduino modules some of them are able to hold operating system on it and those are on high memory ( RAM ) , is it helpful for me ?

TheNoneP: what if i don't want a shield and preferring to use a READY Arduino with more SRAM ? if my question is ok, what kind of arduino could help me ?

there is a lot arduino modules some of them are able to hold operating system on it and those are on high memory ( RAM ) , is it helpful for me ?

I wrote in my answer, which Arduino. How much SRAM do you need?

Juraj: I wrote in my answer, which Arduino. How much SRAM do you need?

Sorry, i didn't notice that ! well, i don't have an exact size but i can make some point to what i want , i have a 'struct' that have 10 data members ( int , char ,string as well as objects of other classes ) , in run-time i have a queue that keep expanding and shrinking ! ,each object of Node is of size (48 byte : this number came by using sizeof() function )

What is the largest number of objects you might have in the queue? Multiply that by the size of the objects to get how much SRAM you need for that, add it to the SRAM you expect to need for other uses. You should definitely set a maximum here - repeatedly allocating and deallocating memory with malloc() and free() can lead to fragmentation of free memory, which will be problematic (this applies regardless of what board you settle on - embedded environments don't clean up the free memory automatically like a desktop computer environment would)

If the 8K of atmega2560 or 16k of atmega1284p (available on third party boards, buildable on perfboard since the chip comes in DIP package, and supported excellently by MightyCore) is not enough, then you need to move outside the AVR product line, or use an atmega2560 with the external memory addition (note that using this external memory requires slightly different techniques than using the internal memory - I haven't done it, but people have written about it in the context of Arduino).

The Due, Zero, etc boards use Atmel SAM processors which are ARM architecture and have higher clock speeds, more flash, and more RAM. There are also third party hardware packages that support the ESP32 (which can have external SRAM chip as found on the WROVER module, vastly expanding memory), STM32, and the Teensy boards - these are fairly popular and have their own active forums for support and discussion (that's why you don't see much talk of them here).

"Blue Pill" costs couple of dollars and has 20KB of RAM - http://wiki.stm32duino.com/index.php?title=Blue_Pill

Will Single Board Computer solve my problems ? There is to many micro-controllers that SBC with huge RAM up to 2G

An SBC will have oodles of ram - but interfacing them to sensors/etc can be more difficult than with a normal microcontroller - usually the GPIO capabilities are limited, often lower logic levels than you want, weaker drivers (lower max current source/sink), and sometimes complications regarding interfacing to these from software.

I’ve seen people with Raspberry Pi’s paired with an Arduino for the low level interfacing stuff, with the raspi doing the more computationally demanding stuff.

DrAzzy: An SBC will have oodles of ram - but interfacing them to sensors/etc can be more difficult than with a normal microcontroller - usually the GPIO capabilities are limited, often lower logic levels than you want, weaker drivers (lower max current source/sink), and sometimes complications regarding interfacing to these from software.

you are right, but what should i do ? i am in really need for memory and the memory (RAM) that the arduino has is not capable to solve my problem ! and that's is why i searched for SBC , any suggestions ?

TheNoneP: you are right, but what should i do ? i am in really need for memory and the memory (RAM) that the arduino has is not capable to solve my problem ! and that's is why i searched for SBC , any suggestions ?

you need all this data in SRAM all the time?

Juraj: you need all this data in SRAM all the time?

yes , because i am building a tree and this tree will be accessed multiple times !

Raspberry Pi Zero 512Mb of RAM. Is it enough for you? (price - $5) https://www.adafruit.com/product/2885

What about adding external SRAM (or EEPROM)?

@Smajdalf see the reply #5.