Hello everybody!
I wrote a code for my homemade giant LED Clock but I get an error while compiling
_P421_LEDClock:233: error: expected initializer before '<=' token
Here is the portion of code (just the conditions that cause problems and the variables needed to run these conditions, it is not necessary that I post the 900 lines of the entire code) :
Variables :
int LEDdigit0[21] = { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 };
int LEDdigit1[21] = { 21,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41 };
int LEDdotpoint[2] = { 42,43 };
int LEDdigit2[21] = { 44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64 };
int LEDdigit3[21] = { 65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85 };
int digit = 0;
Function :
void printDigit // Préparation des numéros de LED pour le bon digit
{
int LEDid[21];
if(digit == 0)
{
for(int i = 0, i <= 20, i++)
{
LEDid[i] = LEDdigit0[i];
}
}
if(digit == 1)
{
for(int i = 0, i <= 20, i++)
{
LEDid[i] = LEDdigit1[i];
}
}
if(digit == 2)
{
for(int i = 0, i <= 20, i++)
{
LEDid[i] = LEDdigit2[i];
}
}
if(digit == 3)
{
for(int i = 0, i <= 20, i++)
{
LEDid[i] = LEDdigit3[i];
}
}
}
Thanks and good evening to all!
Waryard