I have not included all the code as it is quite long and does other things not related to the problem.
}
void writeArduinoOnMatrix1() {
/* here is the data for the characters */
byte a[8]={B00111100,B01111110,B11100111,B11001011,B11010011,B11100111,B01111110,B00111100,};
lc.setRow(0,0,a[0]); lc.setRow(0,1,a[1]); lc.setRow(0,2,a[2]); lc.setRow(0,3,a[3]);
lc.setRow(0,4,a[4]); lc.setRow(0,5,a[5]); lc.setRow(0,6,a[6]); lc.setRow(0,7,a[7]);
}
void writeArduinoOnMatrix2() {
byte a[8]={B11111111,B11111110,B11100000,B11010000,B11001000,B11000100,B11000010,B10000001,};
lc.setRow(0,0,a[0]); lc.setRow(0,1,a[1]); lc.setRow(0,2,a[2]); lc.setRow(0,3,a[3]);
lc.setRow(0,4,a[4]); lc.setRow(0,5,a[5]); lc.setRow(0,6,a[6]); lc.setRow(0,7,a[7]);
}
void writeArduinoOnMatrix3() {
byte a[8]={B11111111,B01111111,B00000111,B00001011,B00010011,B00100011,B01000011,B10000001,};
// diplayThem();
lc.setRow(0,0,a[0]); lc.setRow(0,1,a[1]); lc.setRow(0,2,a[2]); lc.setRow(0,3,a[3]);
lc.setRow(0,4,a[4]); lc.setRow(0,5,a[5]); lc.setRow(0,6,a[6]); lc.setRow(0,7,a[7]);
}
void writeArduinoOnMatrix4() {
// here is the data for the characters
byte a[8]={B00011000,B00111000,B00111000,B00011000,B00011000,B00011000,B00111100,B00111100,};
diplayThem();
/* lc.setRow(0,0,a[0]); lc.setRow(0,1,a[1]); lc.setRow(0,2,a[2]); lc.setRow(0,3,a[3]);
lc.setRow(0,4,a[4]); lc.setRow(0,5,a[5]); lc.setRow(0,6,a[6]); lc.setRow(0,7,a[7]);*/
}
void diplayThem(){
lc.setRow(0,0,a[0]); lc.setRow(0,1,a[1]); lc.setRow(0,2,a[2]); lc.setRow(0,3,a[3]);
lc.setRow(0,4,a[4]); lc.setRow(0,5,a[5]); lc.setRow(0,6,a[6]); lc.setRow(0,7,a[7]);
}
a set of 'if's in the void main() call the functions, Ic.setRow calls a library to send the info to a matrix, the first three work fine, I noticed that the last half of every function is the same and there will be many functions, so I commented out the last half of the forth one and added a new function diplayThem (it was displayThem but display is a key word so I just removed that as being a possible fault.
I think my problem is that I am assigning the variable 'a' as a byte within the function so it is not recognised outside it but how can I get round this?
If I assign 'a' globally and remove 'byte' from the function it tells me it expects a primary expression before the { token.