I have made a display with a clock and three lines of " days since " plus the previous '24 jul 19' type display using 34 MAX7219 chips
.
I tried a modified LedControl sketch to run the displays ( the pin numbers are different to the standard LED blocks, but I can edit a character table if I can see it )
By the time I had got to just the display in 5 lines of 7 characters, it was already telling me I was short of memory, and I hadn't even started counting the "days since" yet.
Here is the crude way I was trying, this is for just showing a demo of all displays showing numbers.
I cannot work out how to make the character into an array inside the character pattern, or how to switch between lc1 and lc2 without repeating everything.
The parola library might be easier for me by making each of the 5 seven character lines into a string and send it ( and work out how to not have it scrolling ) but I can't see the character table file to modify for my displays.
My displays are separate 5x7 so I guess I would have the kerning to make up all 5? 8? columns?
Can anyone suggest the best way to do this please, I am using a promini 328, 5v.
This is my overcomplicated code for just the demo numbers :-
#include <TinyGPS++.h>
#include "LedControl.h"
// #include <VirtualWire.h>
#include <EEPROM.h>
#include <TimeLib.h>
#include <SoftwareSerial.h>
// Configure SoftSerial library
SoftwareSerial SoftSerial(4,13);
TinyGPSPlus gps;
int addr = 0;
int displayArrayA[5] = { 63,63,136,72,72};
int displayArrayB[5] = { 108,254,146,146,146};
int displayArrayC[5] = { 68,124,130,130,130};
int displayArrayD[5] = { 124,254,130,130,130};
int displayArrayE[5] = { 130,254,146,146,146};
int displayArrayF[5] = { 128,254,144,144,144};
int displayArrayG[5] = { 76,124,130,130,138 };
int displayArrayH[5] = { 254,254,16,16,16};
int displayArrayI[5] = { 0,0,254,130,130};
int displayArrayJ[5] = { 0,4,252,130,128};
int displayArrayK[5] = { 130,254,40,16,68};
int displayArrayL[5] = { 2,254,2,2,2};
int displayArrayM[5] = { 254,254,32,64,64};
int displayArrayN[5] = { 254,254,16,32,8};
int displayArrayO[5] = { 124,124,130,130,130};
int displayArrayP[5] = { 112,254,136,136,136};
int displayArrayQ[5] = { 126,124,138,130,134};
int displayArrayR[5] = { 98,254,152,144,148};
int displayArrayS[5] = { 76,100,146,146,146};
int displayArrayT[5] = { 128,128,254,128,128};
int displayArrayU[5] = { 252,252,2,2,2};
int displayArrayV[5] = { 248,248,2,4,4};
int displayArrayW[5] = { 252,252,12,2,2};
int displayArrayX[5] = { 198,198,16,40,40};
int displayArrayY[5] = { 192,192,30,32,32};
int displayArrayZ[5] = { 194,134,146,138,162};
int displayArray0[5] = { 124,124,146,138,162};
int displayArray1[5] = { 0,0,254,66,2};
int displayArray2[5] = { 98,66,138,134,146};
int displayArray3[5] = { 108,68,146,130,146};
int displayArray4[5] = { 8,24,72,40,254 };
int displayArray5[5] = { 156,228,162,162,162 };
int displayArray6[5] = { 76,124,146,146,146};
int displayArray7[5] = { 192,134,144,136,160};
int displayArray8[5] = { 108,108,146,146,146};
int displayArray9[5] = { 124,100,146,146,146};
int displayArrayDOT[5] = { 0,0,6,6,0};
int displayArraySPACE[5] = { 0,0,0,0,0};
int displayArrayDASH[5] = { 16,16,16,16,16};
int displayArrayCOMMA[5] = { 0,0,12,10,0 };
int activenumber;
int x;
LedControl lc0=LedControl(3,2,18,7); // A clock + A since
LedControl lc1=LedControl(3,2,15,7); // B middle date
LedControl lc2=LedControl(3,2,17,7); //C top date
LedControl lc3=LedControl(3,2,14,7); // D bottom date
LedControl lc4=LedControl(3,2,16,7); // E Bsince + Csince
/* we always wait a bit between updates of the display */
byte dig[34];
int brightness = 2;
int standby = HIGH;
int activeletter;
//=========================================================
void setup() {
Serial.begin(9600); // Debugging only
SoftSerial.begin(9600);
Serial.println("setup");
for ( int j=0; j <=7; j++ )
{ lc0.shutdown(j,false);
lc0.setIntensity(j,brightness);
lc0.clearDisplay(j);
lc0.setScanLimit(j,5);
}
for ( int j=0; j <=7; j++ )
{ lc1.shutdown(j,false);
lc1.setIntensity(j,brightness);
lc1.clearDisplay(j);
lc1.setScanLimit(j,5);
}
for ( int j=0; j <=7; j++ )
{
lc2.shutdown(j,false);
lc2.setIntensity(j,brightness);
lc2.clearDisplay(j);
lc2.setScanLimit(j,5);
}
for ( int j=0; j <=7; j++ )
{
lc3.shutdown(j,false);
lc3.setIntensity(j,brightness);
lc3.clearDisplay(j);
lc3.setScanLimit(j,5);
}
for ( int j=0; j <=7; j++ )
{
lc4.shutdown(j,false);
lc4.setIntensity(j,brightness);
lc4.clearDisplay(j);
lc4.setScanLimit(j,5);
}
blankall ();
x=0;
for (byte z=0; z<=4; z++ ) { lc0.setRow(x,z,displayArray1[z]); } x++; // A clock and B sincedays
for (byte z=0; z<=4; z++ ) { lc0.setRow(x,z,displayArray0[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc0.setRow(x,z,displayArray3[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc0.setRow(x,z,displayArray2[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc0.setRow(x,z,displayArray4[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc0.setRow(x,z,displayArray3[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc0.setRow(x,z,displayArray5[z]); } x++;
x=0;
for (byte z=0; z<=4; z++ ) { lc1.setRow(x,z,displayArray9[z]); } x++; // B date YY-month DD
for (byte z=0; z<=4; z++ ) { lc1.setRow(x,z,displayArray1[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc1.setRow(x,z,displayArrayN[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc1.setRow(x,z,displayArrayA[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc1.setRow(x,z,displayArrayJ[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc1.setRow(x,z,displayArray3[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc1.setRow(x,z,displayArray2[z]); } x++;
x=0;
for (byte z=0; z<=4; z++ ) { lc2.setRow(x,z,displayArray0[z]); } x++; // C date YY-month DD
for (byte z=0; z<=4; z++ ) { lc2.setRow(x,z,displayArray2[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc2.setRow(x,z,displayArrayB[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc2.setRow(x,z,displayArrayE[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc2.setRow(x,z,displayArrayF[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc2.setRow(x,z,displayArray0[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc2.setRow(x,z,displayArray1[z]); } x++;
x=0;
for (byte z=0; z<=4; z++ ) { lc3.setRow(x,z,displayArray8[z]); } x++; // D date YY-month DD
for (byte z=0; z<=4; z++ ) { lc3.setRow(x,z,displayArray1[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc3.setRow(x,z,displayArrayG[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc3.setRow(x,z,displayArrayU[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc3.setRow(x,z,displayArrayA[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc3.setRow(x,z,displayArray3[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc3.setRow(x,z,displayArray1[z]); } x++;
x=0;
for (byte z=0; z<=4; z++ ) { lc4.setRow(x,z,displayArray1[z]); } x++; // C since ( 3# and D since ( 4# )
for (byte z=0; z<=4; z++ ) { lc4.setRow(x,z,displayArray5[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc4.setRow(x,z,displayArray1[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc4.setRow(x,z,displayArray7[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc4.setRow(x,z,displayArray9[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc4.setRow(x,z,displayArray6[z]); } x++;
for (byte z=0; z<=4; z++ ) { lc4.setRow(x,z,displayArraySPACE[z]); } x++;
}
//=========================================
void loop() {
x=0;
}

