Go Down

Topic: (Solved) Shrinking a UTFT sketch (Read 784 times) previous topic - next topic

Tumbleweed

Mar 08, 2013, 06:01 am Last Edit: Mar 08, 2013, 02:04 pm by Tumbleweed Reason: 1
I don't know if this should go here or the display forum, so Moderators move it if necessary.
I am trying to convert a sketch I use with a 20x4 lcd to use a 2.4" TFT from ElectroDragon. The sketch comes in at 34,276 bytes. Also I have hacked the ITDB02 sheild to enable the I2C pins, so I can't use the SD card to store anything even if i knew how.
I can make the display do everything I want as long as I leave out the menu switch case I use to calibrate the sensors, so that part of the code is working. Of course that doesn't help much, I can't really use the sketch if I can't set it up without loading a seperate sketch to calibrate. Well, I can but I can't share it with friends that don't have any Arduino experience.  I tried using the smaller font, but that only dropped it down from 34,276 to around 33, 500, plus the display is small enough already.
I really like the crisp color display, I can change the color of the graphs when the tank gets fuller, giving a quick visual warning when they get close to full.
If there is no way to shrink the sketch, guess it's time for a Mega. (Honey, the guys on the forum said I needed it!)
Sheesh, can't even past half the code here. Attatched
Thanks
TomJ
Einstein once said you don't really understand anything until you can explain it to your Grandmother

MarkT

You have edited  libraries/UTFT/memorysaver.h  to reduce memory usage I presume?
[ I won't respond to messages, use the forum please ]

Tumbleweed

Thank You MarkT
Just what I needed,
The documentation for UTFT is really great but I missed that somewhere.
Actually dropped the sketch almost 10K.
If it actually works, now that it compiles. lol
TomJ
Einstein once said you don't really understand anything until you can explain it to your Grandmother

Go Up