TFT Menu Icons

Hi there,

I have created some rectangular buttons on my TFT interface and am having trouble working out the best way to create icons, which is recommended:

  1. Load bitmaps to SD card and have the Arduino load the images for the Menu buttons.
  2. Convert the icons to hex code.
  3. Is there another more efficient way?

Not sure if this helps but I am currently using the following hardware and libraries:

Arduni Uni R3.
Adafruit 2.8" TFT w Capacitive Touch.

#include <Adafruit_GFX.h> // Core graphics library
#include <SPI.h> // this is needed for display
#include <Adafruit_ILI9341.h>
#include <Wire.h> // this is needed for FT6206
#include <Adafruit_FT6206.h>
#include <SD.h> // SD card library

Any guidance/thoughts are greatly appreciated, thanks!

Since nobody else has answered you, here is my tuppence worth.

You said you are using an Uno, as such I would say the deciding factor would be down to your particular project. For example how much free flash do you have left? If you are close on the limit then I would say you have little choice but to use SD for your icons/image files, on the other hand, if you have plenty of spare flash, then by all means go ahead and convert them to a .c array of hex characters and include them in your sketch.

Both methods are acceptable, but loading them from flash will give you a speed advantage.

Season's Greetings.

Regards,

Graham

Most icons are simple shapes that you could draw from scratch. Other icons are complex shape but only a single colour. Any full colour "photo" icon is only practical as a bitmap.

If you have several complex icons, the SD card or a Flash chip is the only place to store them.

Just look at the example programs that come with most libraries. Even a small bitmap uses quite a lot of AVR flash memory.

David.

Warm welcome guys and thanks, merry xmas!

The icons are only single colour and very simple, I will have a go at both Hex characters and saved via the SD card and see which uses the least memory.