int p[] = {60,24,24,24,24,24,56,24};
int p2[] = {126,62,24,12,6,6,126,60};
int p3[] = {60,126,6,30,30,6,126,60};
void setup() {
}
void loop() {
case 83595375: matrixx(p); break; // push button 1
case 83605575:
if (matrix == 1 && display == 0)
{
for (n=0;n<8;n=n+1)
{
lc2.setColumn(0,(n),(p2[n]));
}
}
break; // push button 2
}
void matrixx(int r)
{
if (matrix == 1 && display == 0)
{
for (n=0;n<8;n=n+1)
{
lc2.setColumn(0,(n),(p[n]));
}
}
}
I have added a small part of my program above.
I am using an old tv remote to drive a matrix board via a max 7219.
The program that contains the bit above works.
the array p runs in the void matrixx.
What I would like to do is use the void matrixx to put different symbols on the matrix board.
I hoped I could do this by making the p in the line
lc2.setColumn(0,(n),(p[n]));
in the void matrixx into a variable and alter it with the (int r) as in
void matrixx(int r)
then calling it with
matrixx ( p1 or p2 or p3 )
from within a case but every method I have tried has failed.
Is there a way of doing this?
thanks.