Stoopalini
Member
Surely the array sizes should be 13 and 8 instead of 12 and 7
And I think you would want a data type of uint8_t instead of uint16_t
Thanks, makes sense ... so declare the array with sizes 13 and 8, but would I address it with 0 - 12 and 0 - 7?
For the data type, Hex is base 16, so I thought I would be using uint16_t. But now that I think about it more, maybe I just need to declare it like: byte EVICMessages[13][8];
I changed the name of the matrix as it appears you can't start the name with a number (IDE gives me an error if I try to use 328Matrix as the name).
So I can declare it with byte EVICMessages[13][8]; without a compile error, but when trying to populate it with values, I am getting an error. Not sure if it's just a syntax error, or if I'm going about this incorrectly though.
Code:
EVICMessages[13][8] = { {0x60, 0x42, 0x00, 0x54, 0x00, 0x68, 0x00, 0x65},
{0x50, 0x02, 0x00, 0x20, 0x00, 0x4A, 0x00, 0x75},
{0x40, 0x02, 0x00, 0x6C, 0x00, 0x69, 0x00, 0x65},
{0x40, 0x02, 0x00, 0x6C, 0x00, 0x69, 0x00, 0x65},
{0x40, 0x02, 0x00, 0x6C, 0x00, 0x69, 0x00, 0x65},
{0x40, 0x02, 0x00, 0x6C, 0x00, 0x69, 0x00, 0x65},
{0x40, 0x02, 0x00, 0x6C, 0x00, 0x69, 0x00, 0x65},
{0x40, 0x02, 0x00, 0x6C, 0x00, 0x69, 0x00, 0x65},
{0x40, 0x02, 0x00, 0x6C, 0x00, 0x69, 0x00, 0x65},
{0x40, 0x02, 0x00, 0x6C, 0x00, 0x69, 0x00, 0x65},
{0x40, 0x02, 0x00, 0x6C, 0x00, 0x69, 0x00, 0x65},
{0x40, 0x02, 0x00, 0x6C, 0x00, 0x69, 0x00, 0x65},
{0x40, 0x02, 0x00, 0x6C, 0x00, 0x69, 0x00, 0x65}
};
The error I'm getting is:
Code:
403 | };
| ^
exit status 1
Compilation error: cannot convert '<brace-enclosed initializer list>' to 'byte' {aka 'unsigned char'} in assignment