Hi,
"The modulo operator % computes the remainder. When a = 9 is divided by b = 4, the remainder is 1. The % operator can only be used with integers."
Although, in the following piece of code, the condition "if( (t %10) == 1 )" and the ones after aren't being run.
Already verified if I swap t for a number (1, 101, etc) the code following the "if" statement will run.
Already declared the "alarm" array as just an integer but had no luck.
//(...)
//global variable
unsigned int *alarm[14][4] = { {06, 30, 0, 0}, {0, 0, 0, 0} };
// alarm[x][4] = d*E6 + s*E5 t*E4 q*E3 q*E2 s*E1 s*1
//(...)
//in setup function:
short int i;
for(i=0; i<15; i++)
{
alarm[i][0]=0;
alarm[i][1]=0;
alarm[i][2]=0;
alarm[i][3]=0;
}
alarm[1][2]=1;
alarm[1][3]=1111111;
//(...)
//(...) in another function
int t;
//(...) still in this another function
{
tft.print(" ON");
t = alarm[i][3];
if( (t %10) == 1 ) {tft.setCursor(0, e[i]); tft.print( "Dom " );}
if( (t %100) == 1 ) {tft.setCursor(0, e[i]); tft.print( "2a " );}
if( (t %1000) == 1 ) {tft.setCursor(0, e[i]); tft.print( "3a " );}
if( (t %10000) == 1 ) {tft.setCursor(0, e[i]); tft.print( "4a " );}
if( (t %100000) == 1 ) {tft.setCursor(0, e[i]); tft.print( "5a " );}
if( (t %1000000) == 1 ) {tft.setCursor(0, e[i]); tft.print( "6a " );}
if( (t %10000000) == 1 ) {tft.setCursor(0, e[i]); tft.print( "Sab " );}
}
I am not receiving any error message.