Hello,
I have defined the following data structure
typedef struct Star// this structure is defined before the array named StarsList
{
char *StarName;// name of the star "Arcturus"
int32_t RA;// Right ascension 513397
int32_t DECL;// Declination 690570
};
and in program i have the table
// the table i want to store in progmem contains the star name, and star coordinates
const PROGMEM Star StarsList[] = {
{"Sirius", 243089, -601780},
{"Canopus", 230371, -1897050},
{"Arcturus", 513397, 690570},//used in the example above
{"RigilKentaurus", 527759, -2190070},
{"Vega", 670163, 1396210}
};
to read the data from the table i use
function text of the lcd needs the string and the coordinates on the display
//for example will display CrtStar at x=10, y=70
Star CrtStar = StarsList[3];// define variable CrtStar that will have the star name and coordinates from table StarList
text("CrtStar:", 10, 70);
text(CrtStar.StarName, 60, 70);//doesn't display anything
//code below works
text("RA:", 135, 70);
text((long)CrtStar.RA, 155, 70);
text("DEC:", 205, 70);
text((long)CrtStar.DECL, 230, 70);
and the function for displaying strings on lcd is below (from lcd library
text(char *textString, uint16_t xLoc, uint8_t yLoc);
How can i get the string from the table and display it on the lcd? (i don't know how to copy/transfer "Arcturus" to CrtStar.StarName
Thanks