Braces around Scalar Initializer for type 'byte' ERROR
i'm trying make 2d array, of 8x8 led matrix, original code warants 8x10.
i have code:
except error, appreciated!
i have code:
code: [select]
#define e { \
{0, 1, 1, 1, 1, 1, 1, 0}, \
{0, 1, 0, 0, 0, 0, 0, 0}, \
{0, 1, 0, 0, 0, 0, 0, 0}, \
{0, 1, 1, 1, 1, 1, 1, 0}, \
{0, 1, 0, 0, 0, 0, 0, 0}, \
{0, 1, 0, 0, 0, 0, 0, 0}, \
{0, 1, 0, 0, 0, 0, 0, 0}, \
{0, 1, 1, 1, 1, 1, 1, 0} \
}
const int numpatterns = 8;//this number of patterns want display
byte patterns[numpatterns][8]={e,e,e,e,e,e,e,e};// patterns order
except error, appreciated!
e definition 2 dimensional array initialiser.
patterns declared 2 dimensional array, initialise array of 2 dimensional arrays (e), or, in other words 3 dimensional array, , cannot initiate 2 dimensional array 3 dimensional values, hence error.
this solves immediate compile issue:
but i'm not sure if solves overall problem.
patterns declared 2 dimensional array, initialise array of 2 dimensional arrays (e), or, in other words 3 dimensional array, , cannot initiate 2 dimensional array 3 dimensional values, hence error.
this solves immediate compile issue:
code: [select]
byte patterns[numpatterns][8][8] ={e,e,e,e,e,e,e,e};// patterns order
but i'm not sure if solves overall problem.
Arduino Forum > Using Arduino > Programming Questions > Braces around Scalar Initializer for type 'byte' ERROR
arduino
Comments
Post a Comment