我在Arduino中有以下代码:
const byte L[] = {
B01100000,
B01100000,
B01100000,
B01100000,
B01100000,
B01100000,
B01111110,
B01111110
};
const byte K[] = {B00100010,
B00100100,
B00101000,
B00110000,
B00110000,
B00101000,
B00100100,
B00100010};
const byte LK[][8]={L,K};
我将在最后一行收到错误array must be initialized with a brace-enclosed initializer
。我想知道如何在Arduino中为二维分配值吗?
答案 0 :(得分:0)
您可以使用指针数组来实现此目的:
const byte* LK[2] = {L, K}