Hi - I'm at a 'post-beginner', 'pre-intermediate' Wiring/C++ programming level. I've created custom libs, etc. and generally can get stuff done (tho' often with help.. ).
Anyway - with a recent project with some custom classes for controlling LEDs on an atmega168 I ran into what had to be memory issues: if I added Serial.print statements, the program would stop working. The sketch itself only took up @ 1/3 of available storage space.
To save ram I made sure that I: --used bytes/chars instead of ints where possible --used bitshifting instead of arrays where possible
I looked into PROGMEM but there wasn't much that was static so ended up not using it.
Are there other relatively easy things to do? If not, what would be a next step? Is it possible to store functions in PROGMEM? (and/or is that worth the effort).
Library (class) instances seem to take up lots of memory but the alternative is more confusing/tedious/harder programming (e.g. having to have loads of global variables).
tx for any tips!