标题: 光立方4✖4✖4程序 [打印本页] 作者: 1098928119 时间: 2019-5-17 18:25 标题: 光立方4✖4✖4程序 int layer[4]={A3,A2,A1,A0}; //初始化和声明LED层
int column[16]={13,12,11,10,9,8,7,6,5,4,3,2,1,0,A5,A4}; //初始化和声明LED行
int time = 250;
void setup()
{
for(int i = 0; i<16; i++)
{
pinMode(column[i], OUTPUT); //setting rows to ouput
}
for(int i = 0; i<4; i++)
{
pinMode(layer[i], OUTPUT); //setting layers to output
}
randomSeed(analogRead(10)); //seeding random for random pattern
}