shorten arduino code

hi,

i'm struggling with this code, i want to short it but i don't know how.
Thanks in advance.

for (int i = 0; i < 8; i++) {
setPixel(1,i,0,1,1,0);
setPixel(0,i,7,0,0,0);
}
delay(TD10);

for (int i = 0; i < 8; i++) {
setPixel(2,i,0,1,1,0);
setPixel(0,i,6,0,0,0);
}
delay(TD10);

for (int i = 0; i < 8; i++) {
setPixel(3,i,0,1,1,0);
setPixel(0,i,5,0,0,0);
}
delay(TD10);

for (int i = 0; i < 8; i++) {
setPixel(4,i,0,1,1,0);
setPixel(0,i,4,0,0,0);
}
delay(TD10);

for (int i = 0; i < 8; i++) {
setPixel(5,i,0,1,1,0);
setPixel(0,i,3,0,0,0);
}
delay(TD10);

for (int i = 0; i < 8; i++) {
setPixel(6,i,0,1,1,0);
setPixel(0,i,2,0,0,0);
}
delay(TD10);

for (int i = 0; i < 8; i++) {
setPixel(7,i,0,1,1,0);
setPixel(0,i,1,0,0,0);
}
delay(TD10);

for (int i = 0; i < 8; i++) {
setPixel(0,i,0,0,0,0);
}
delay(TD10);

Please read this:-
How to use this forum
Because your post is breaking the rules about posting code.
Also please post all your code not just a fragment.

  for (int j = 1; j <= 7; j++) {  // spelling error, was 'i <= 7'

    for (int i = 0; i < 8; i++) {
      setPixel(j, i, 0, 1, 1, 0);
      setPixel(0, i, 8 - j, 0, 0, 0);
    }
    delay(TD10);
  }
  for (int i = 0; i < 8; i++) {
    setPixel(0, i, 0, 0, 0, 0);
  }
  delay(TD10);

Gabriel_swe - no look at the parameters he is sending in the setPixel calls. That code will not hack it.

Looking closely and I see I got a spelling error. i instead of j in first for loop.
First parameter in first setPixel - counting up from 1 to 7 (j variable)
Third parameter in second setPixel - counting down from 7 to 1 (8 minus j variable).

Is there something else I can't see it.

The parameters you send which are loop variables do not match his origional parameters.

Anyway the OP is asking something related in another thread and when I asked him about this thread he seems not to be interested so don't bother any more unless you want to do it for your own interest.

I did it with a function, arrays and another loop in the main code. I had to copy the parameters into two arrays that is how I know the numbers he used can not be generated by loops running up and down.