Reducing your footprint

Hello,
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 http://www.arduino.cc/en/Guide/Troubleshooting#size 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

Hi,

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

https://www.arduino.cc/reference/en/language/variables/utilities/progmem/

Hope it helps. Regards.