int8_ t Addr[MatrixPix_ X][MatrixPix_ Y]= { //1x1
{64} // 点阵IIC地址),
Matrix display = Matrix(Addr, TYPE_ COLOR); //TYPE _COLOR or TYPE_ _S2
void setup( {
Wire.beginO;
display.setBrightness(255);
//display.setLedBrightness(x, y, random(0, 255))
//设置指定灯颜色
for (inty= 0; y < display.getHeight) * 8;y++) {
for (intx= 0; x < display.getWidth()* 8; x++) {
display.setLedColor(x, y, random(0, 255), random(0, 255), random(0, 255)); //x,y,1,g,b
delay(5); } }
delay( 1000);
//设置指定灯开
display.clearDisplayO;
for (inty= 0; y < display.getHeight) * 8;y++) {
for (intx= 0; x < display.getWidth(* 8;x++) {
display.setLed(x, y, true); //x, y, sta
delay(20);
。
}}
delay( 1000);
display.clearDisplay0;
创建时间:2021/01/17
作者: | 谢杨明 |
立即注册