先上效果图:
一般买回来的是四屏的,
反过来看到前端有连接引脚,后面没有,
拿回来之后,
就取下LED灯,焊上引脚
一共需要4条,共16个屏
这是反过来的效果
把四个屏连接起来
连接好后最好组合起来,这里正面,我贴了透明胶,
连接效果图,这里说明一下,这里分开两组,第组8个屏,这样,有两处连接ESP8266,
(注间:理论上是可以一组引脚 一直串连16个屏,但我测试有问题,不知道原因,只能这样,两组连接,有需要的可以控讨研究下。)
上图也可以理解为
修改aruduino代码,这里空音有限不能全部显示
//显示IP代码 16块屏
void DisplayIP( )
{
//例如IP是 10.8.3.60
IPAddress ip;
ip = WiFi.localIP();
DisplayIPDuan(ip[0],lc1, 0); // 010.
DisplayIPDuan(ip[1],lc1, 4); // 008.
DisplayIPDuan(ip[2],lc2, 0); // 003.
DisplayIPDuan(ip[3],lc2, 4); // 060
delay(1000);
}
这是一块硬件,4个屏,4个字符
void DisplayIPDuan(int nIPt,LedControl lc, int nled)
{
int nt2 = nIPt%100;
int nt1 = nIPt - nt2;
int nt3 = nIPt % 10;
nt1= nt1/100;
nt2= (nt2-nt3)/10;
printChar(lc, nled, nt1+47);
printChar(lc, nled+1, nt2+47);
printChar(lc, nled+2, nt3+47);
printChar(lc, nled+3, 46);
}
这是单块屏显示一个字符
void printChar(LedControl lc, int nLed, int nChar)
{
for(int nrow=0; nrow<8;nrow++)
{
lc.setRow(nLed, nrow ,CharAscii[nChar][nrow]);
}
}
最终显示效果
相关完整源码:
小结:
本代码实现了整合16屏后的简单操作,后续会开发更多功能。