Find another sketch
for (int jj; jj<sizeof(leds)/sizeof(int);jj++){
It would be a lot easier of you don't use sizeof(int)
in there but sizeof(leds[0]
. If you decide to make the leds array an array of bytes instead of integers, you don't have to adjust the for-loop.
And as pointed out, jj
is not initialised. So the complete line would be
for (int jj = 0; jj<sizeof(leds)/sizeof(leds[0]);jj++){
No, it will be 2, the number of bytes; not the number of bits.
PS
Please use code tags in future as described in How to get the best out of this forum. It makes it easier to read, easier to copy and prevents the forum software from incorrect interpretation of the code.