Hello everyone
Im trying to store an array in a struct which is stored in PROGMEM and while the programm is running it should paste the p1 to pBuff. i already tried this:
enum Function{
GOTO
};
struct ZeilenText{
char Text [10];
};
struct ZeilenFunktion{
Function Funktion;
};
struct Page {
ZeilenText* ZT;
ZeilenFunktion* ZF;
};
ZeilenText zT1 [6] PROGMEM = {"1.1","1.2","1.3","1.4","1.5","1.6"};
ZeilenFunktion zF1 [6] PROGMEM = {GOTO,GOTO,GOTO,GOTO,GOTO,GOTO};
Page p1 PROGMEM = {zT1,zF1};
void setup()
{
Serial.begin(115200);
for(uint8_t i = 0; i < 6; i++)
{
Serial.println(p1.ZT[i].Text);
}
}
void loop()
{
}
but it only spitts out garbage data over serial. so it tried this:
enum Function{
GOTO
};
struct Page {
char Text [10][6];
Function Funktion[6];
};
Page p1 PROGMEM;
p1.Text = {"1.1","1.2","1.3","1.4","1.5","1.6"};
p1.Funktion = {GOTO,GOTO,GOTO,GOTO,GOTO,GOTO};
void setup()
{
}
void loop()
{
}
but this wont even compile.
I want to do it this way and not this way because of the overview when designing menus for a display.
enum Function{
GOTO
};
struct Page {
char Text [10][6];
Function Funktion[6];
};
Page p1 PROGMEM = {{"1.1","1.2","1.3","1.4","1.5","1.6"},{GOTO,GOTO,GOTO,GOTO,GOTO,GOTO}};
void setup()
{
}
void loop()
{
}
because i want to keep a nice overview while designing a menu.