I have a string full of 0 and 1 that represent a on or off for each led in the 3 matrix displays. Currently i send it to the max7219 by the LedControl library. I have to do 192 loops in order to enable of disable separately each led. That's takes time and causes a lot of flickering also doesn't allow me to send to the arduino via serial with a delay less than 300ms. My question is. Is it possible to send a string 010101010 somehow like that to the max7219 without having to convert it to boolean for each character? My code is:
Value is the string and is an following of 0 and 1 also 192 in length. lc is the led control.
for (int a = 1; a <= 65; a += 1) {
if (String(Value[a - 1]) == "1") {
lc.setLed(0, X(a), Y(a), true);
}
else {
lc.setLed(0, X(a), Y(a), false);
}
if (String(Value[a + 63]) == "1") {
lc.setLed(1, X(a), Y(a), true);
}
else {
lc.setLed(1, X(a), Y(a), false);
}
if (String(Value[a + 127]) == "1") {
lc.setLed(2, X(a), Y(a), true);
}
else {
lc.setLed(2, X(a), Y(a), false);
}
}