I've some PROGMEM string; I want put all of them in a file (header or source) and include that file in all the other who need the string;
I want also that the strings have a different value depending on "something", such as a # define
is a difficult thing to explain, then make a trivial example:
file.h
# ifndef file_h
# define file_h
# if defined A
str1 = "A1";
str2 = "A2";
# else if defined B
str1 = "B1";
str2 = "B2";
# else
str1 = "C1";
str2 = "C2";
# endif
char * arr [] = {str1, str2};
# endif
(eventually create the array in each block of the if-else; the definition of 'A', 'B' etc is made by the sketch)
unfortunately such a thing as above by an error of multiple definiton of ... although "file.h" is included only one other file ...
another soluction is to make fileA.h, fileB.h etc and include only a file in sketch, and all the file in the other who need it... but I do not know how to do...
you have any ideas?
p.s. each string is progmem