Iv been using an LCD screen on my Arduino Mega and have recently found out about storing images as Byte Arrays using a small windows based tool to convert an image.
I then copy/paste this byte array (quite alot of charters) at the top of the arduino sketch and can reference and use the byte array/image on my LCD screen which is great!
The problem is this makes the sketch VERY long when having multiple images....
How do I go about storing this byte arrays (images) in a separate file such as a .c or .h file within my sketch folder which I can then still access to within my sketch for use on the LCD screen?
A quick step by step guide would be great because im 100% this is possible to do.
#include is your friend. Create a new file called "image_a.h", paste the text in from your first image. Create a second file called "image_b.h" and paste the text from the second image.
Then at the top of your sketch, you do this:
#include "image_a.h"
#include "image_b.h"
The compiler will insert your files at that point.