I can't use array[] to controlling led states... (POV)

I have tried use a array to control the state of leds but i can’t i have tried with int and bool but still not work yet…

Someone could say me what is to fail?

this is my code:

I want controlling the leds states that this form cause I think use a Three dimensional array to form letters in rotary system POV but for the moment I need know how use arrays of this form…

Sorry, my english is limited,

//int or bool type the trouble still there

int statesArray[5]={0,1,1,1,0,1};


int pin=2;

void setup()
{

 while(pin<8)
{
   pinMode(pin,OUTPUT);
pin++;
}

}

void loop()

{
 
pin = 2;
while(pin<8)
{
   digitalWrite(pin,statesArray[pin-2]);
pin++;
delay(550);

}

}

I don't know about what you expect your sketch to do, but I suggest you look at the difference the use of " : " and " ; " makes. Secondly. how many elements does your array have??

Also, Ctrl-T on the source code while in the IDE is your friend.

Sorry wrong key, my code it's more extensive so, i only write the more important, but my problem not is of sintaxis error, in my code, compiling doens't give error but not work...

I think that my problem is in digitalWrite(pin,//here);, that not activate the pin...

My array have 5 elements.

This is that i did. but the code its very extensive so that i think to use a three dimensional array to have

arrayState[thePin][Rows][Cols]

and form letters more easy //A

001100
110011
111111
111111 //A
110011
110011

111111
110000 //E etc
111111
111111
110000
111111

but not work

The code you didn't post does something. You expect it to do something.

All we know at this point is that the two somethings are not the same thing. With only that information, we can not tell you why your expectations are wrong.

In the description of digitalWrite(pin,value) it says that the valid values for value is LOW and HIGH. Are you certain that 1 and 0 can be used instead of LOW and HIGH?

Sorry, you have reason PaulS, i want synthesize code with de array but i have taks error its

arrayStates[letters][Rows][Cols];

i want use this array to do a function to do my letters, and and being able to call it from a cycle like this:

int p=0;
void loop()

{
    pin = 2;
   while(pin<8)
{
   while(p<pin)
 
digitalWrite(pin,arrayStates[pin-2][]


}


}

Sorry, you have reason PaulS, i want synthesize code with de array but i have taks error its

arrayStates[letters][Rows][Cols];

i want use this array to do a function to do my letters, and and being able to call it from a cycle like this:

This way will be more simple my code cause just i will the letters in my array… with 0 or 1

I will try that way eewoz, maybe will it works…

int p=0;
void loop()

{
    pin = 2;
   while(pin<8)
{
   while(p<pin)

digitalWrite(pin,arrayStates[pin-2][p];

p++;

}

}

I can not understand what you are trying to do.

You
don't seem
to be
able
to indent
your code
worth a damned.

Use Tools + Auto Format to properly format your REAL code, and post ALL of your REAL code.

That crap you posted won't even begin to consider the possibility of thinking about compiling.