How to save some bytes

Max89:
@bubulindo
What if I use 4 bit-mode for LCD ?

You are already using 4 bit mode to use the LCD. Two signal bits and 4 data bits. if you used it in 8 bit mode, you'd need 10 or 11 bits.
If you are using a Mega and have spare bits, you could ditch the LCD library and interface the LCD in 8bit mode. That way you could definitely cut a fair bit of code. Interfacing the LCD in 8 bit mode is not that hard either since you can get an auto-increment on the position, etc... :slight_smile:

Or like Udo said, make a copy of the Arduino libraries and slim them down to see what you get. Not sure how to do it on AVR-GCC, but normally you could change the optimization settings in the compiler and that sometimes does give you a bit more code space.

Have you tried what I suggested?