I have a atmega 328 and have been trying to follow the guide to finding out how much ram is being used at any given time for debug purposes.However in the serial monitor im getting 1824 bytes with the char array declared and with it commented out which is very confusing.
Any ideas whats going on ?
Im using the libary from here and the example sketch from here:
http://playground.arduino.cc//Code/AvailableMemory
#include <MemoryFree.h>
// 14-bytes string
//char str[] = "Hello, world!";
void setup() {
Serial.begin(115200);
}
void loop() {
//Serial.println(str);
Serial.print("freeMemory()=");
Serial.println(freeMemory());
delay(1000);
}
Cheers