so "011100000" represents 1st led off second on third on fourth on... ect.
In C, a constant starting with a zero is taken to be an octal value, in this case, the equivalent decimal value is 2 392 064.
If you want a binary constant, prefix the number with "0b".
I just realized what i was doing wrong with my original code.....
i declared my array wrong
int first[3][9] = {
111000000,
011100000,
001110000,
};
Should have been ...
int first[3][9] = {
{1, 1, 1, 0, 0, 0, 0, 0, 0},
{0, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0, 0, 0},
};
if i want declare them as bytes i should do this?
int first[3]= {
0b111000000,
0b011100000,
0b001110000,
};
do i have to change the array type to byte? also i tried this method but used the "B" prefix and it only let me use upto 8 numbers.. i have 9 leds so thats a problem.