Skip to content

Instantly share code, notes, and snippets.

@rlogiacco
Created September 5, 2017 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rlogiacco/974024184c38ac7957cad437ea7dd433 to your computer and use it in GitHub Desktop.
Save rlogiacco/974024184c38ac7957cad437ea7dd433 to your computer and use it in GitHub Desktop.
Arduino free RAM
int freeRam() {
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment