I have a problem with my code, and I suspect it is caused by overloaded memory, so I want to check memory usage at real time. Is there a way to find available memory on arduino due at runtime? I found a code in Arduino Playground (Arduino Playground - AvailableMemory), but it does not work for Arduino Due.
Thanks for that - seems to work great. Of course, only on the Due... so hard to use it to do comparisons between the board. What a gaping hole in the Arduino libraries! With 2K of SRAM, OF COURSE a simple to use memFree is needed. Rant rant...
When I use this is a very simple sketch, I get
Dynamic ram used:0
Program static ram used 2616
Stack ram used 72
My guess at free mem: 95616
This looks like 2.6K used, for a sketch that just uses the serial port . that seems a lot! What figures have you found?