I could not read the sd I added this code and it worked
in tab setup
myfile.begin(ChipSelect_SD, SPI_FULL_SPEED);
in tab ferduino
now it works fine
thank you
I need more help
I wrote the code to display the images of the moon phase by loading them in the code in .c
in tab moonPhase
if ((AG >= 0) && (AG <= 1.85)) // 0 a 12.5%
{
LP = tabela_textos_fase[1]; // "LUNA NUOVA"
MoonPic = New_Moon;
}
if ((AG > 1,85) && (AG <= 5.54)) //12.5% a 35.5%
{
LP = tabela_textos_fase[2]; // "LUNA CRESCENTE"
MoonPic = Waxing_Crescent;
}
if ((AG > 5.54) && (AG <= 9.23)) // 37.5 A 62.5%
{
LP = " PRIMO QUARTO"; // "PRIMO QUARTO"
MoonPic = First_Quarter;
}
if ((AG > 9.23) && (AG <= 12.92)) // 62.5 A 87.5%
{
LP = "GIBBOSA CRESCENTE"; //GIBBOSA CRESCENTE
MoonPic = Waxing_Gibbous;
}
if ((AG > 12.92) && (AG <= 16.61)) // 87,5 a 100 e da 100 a 87.5%
{
LP = tabela_textos_fase[3]; // "LUNA PIENA"
MoonPic = Full_Moon;
}
if ((AG > 16.61) && (AG <= 20.30)) // 87.5 A 62.5%
{
LP = " GIBBOSA CALANTE"; // GIBBOSA CALANTE
MoonPic = Waning_Gibbous;
}
if ((AG > 20.30) && (AG <= 23.99)) //62.5 A 35.5%
{
LP = " ULTIMO QUARTO"; //ULTIMO QUARTO
MoonPic = Last_Quarter;
}
if ((AG > 23.99) && (AG <= 27.68)) // 37,5 a 12,5%
{
LP = tabela_textos_fase[4]; // "LUNA CALANTE"
MoonPic = Waning_Crescent;
}
if ((AG >= 27.68) && (AG <= LC)) //12.5 a 0%
{
LP = tabela_textos_fase[1]; // "LUNA NUOVA"
MoonPic = New_Moon;
}
return phase;
in tab ferduino
unsigned int *MoonPic;
extern unsigned int
New_Moon[0xD24],
Waxing_Crescent[0xD24],
First_Quarter[0xD24],
Waxing_Gibbous[0xD24],
Full_Moon[0xD24],
Waning_Gibbous[0xD24],
Last_Quarter[0xD24],
Waning_Crescent[0xD24];
in this way it works fine
but I would like to load from sd pictures with the library UTFT_SdFat in order to free up space on the Arduino memory
but I can not get it to work you will give me a help?