Created
January 6, 2014 17:28
-
-
Save Threeethan/8286266 to your computer and use it in GitHub Desktop.
Quick and dirty estimate of free ram on Arduino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int freeRam () { | |
extern int __heap_start, *__brkval; | |
int v; | |
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval); | |
} | |
Serial.print("Free Ram = "); Serial.println (freeRam()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment