Reducing your footprint

I am trying to upload my code on the pro mini, but I am getting not enough memory error. Can anyone suggest something how I can remove this error.

“Not enough memory; see for tips on reducing your footprint.
Error compiling for board Arduino Pro or Pro Mini.”

test_new.ino (8 KB)

Since you have quite a number of debugging prints, a quick and simple way of reducing some of the RAM usage is to use the F() macro to prevent the text strings from being copied into RAM.

So this:
Serial.println("void setup");
becomes this:
Serial.println(F("void setup"));

Worked. Thanks


Maybe too much string constants in your sketch? You may want to check this out:

Hope it helps. Regards.