Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Checking memory footprint in Arduino

I'm working on a simple project with my Arduino. Recently I had to convert one of my variables to a long instead of an int, and in order to keep things simple I just moved over all the numbers that it interacts with (so I don't have to worry about cross-type comparisons and math). This seems wasteful, but it's just a clock for myself, and I don't care that much.

It has, however, made me wonder about how much memory I am using. I doubt it's an issue, but I realized I don't know any way to check.

So, is there a way to check the amount of memory being used by an Arduino?

Ideally, I'd like to print out the current memory / total available over the serial connection.

like image 516
MrGlass Avatar asked Dec 27 '11 20:12

MrGlass


1 Answers

Try using MemoryFree. This library has worked well for me.

like image 92
amicitas Avatar answered Sep 30 '22 07:09

amicitas