i do array woth many elements (about 10k)
byte cc[] = {...} - like that
and i have problem access to this. while array less 2.5k programm see all elements. and while array more 3k programm read this not right.
programm in iddle read first 80 elements - its NULL. and when i increase data in array my iddle read from this not NULL (not first 80 elements)
i think array have a restriction for lenght, but i cant read in docs about it.
i whant array about 100k elements and not understand what hapened now...
byte cc[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
8, 4, 16, 8, 36, 16, 8, 36, 8, 4, 16, 8, 36, 16, 8, 36, 8, 4, 16, 8, 36, 16, 8, 36, 8, 4, 16, 8, 36, 16, 8, 36, 8, 4, 16, 8, 36, 16, 8, 36, 8, 4, 16, 8, 36, 16, 8, 36, 8, 4
... and next...};
//======================================================================
void setup()
{
DDRB = B00111111;
setLine (0);
}
//======================================================================
void loop()
{
int sensorValue = 1000 + analogRead(5)*10;
int buttonState = digitalRead(5);
if (buttonState == 0)
{
for (int k=1; k<=20; k++)
{
for (int n=0; n<sensorValue; n++)
{
setLine (k*80);
}
}
}
setLine (0);
//delay(10);
}
//======================================================================
void setLine (int pos)
{
int num;
for (int j=0; j<10; j++)
{
for (int i=0; i<8; i++)
{
num = j*8+i+pos;
PORTB = 0 + cc[num];
PORTB = 2 + cc[num];
}
PORTB = B00000001;
}
}
what i do not right?