【发布时间】:2014-08-09 10:56:05
【问题描述】:
我目前正在开发一个 8x8 LED 矩阵程序,并且遇到了使用 8x10 矩阵引擎的代码。
EDIT 'A' 和 'R' 是给定的已定义字符串:
#define A {B00000000,B00111100,B01000010,B01000010,B01000010,B01111110,B01000010,B01000010,B01000010,B00000000}
和#define R {B00000000,B00111100,B01000010,B01000010,B01000010,B01111100,B01000100,B01000010,B01000010,B00000000}
我目前正在尝试更改此行(8x10 矩阵数组)
const int numPatterns = 16;//this is the number of patterns you want to display
byte patterns[numPatterns][10]={A,R,A,R,A,R,A,R,A,R,A,R};// the patterns order
对此:
const int numPatterns = 16;//this is the number of patterns you want to display
byte patterns[numPatterns][8]={A,R,A,R,A,R,A,R,A,R};// the patterns order
但是,它继续给我一个错误,我尝试自己理解其他语言中的二维数组的概念,除了我在这个 IDE 中的基本经验,它似乎不喜欢对二维数组进行任何真正的更改。
【问题讨论】:
-
我已经编辑了我的帖子,希望现在更有意义。
标签: arrays matrix arduino initializer