// For: https://forum.arduino.cc/t/works-perfectly-on-uno-but-garbage-on-nano/1061689
//
//
#include "LedControl.h"
#include "lcd.h"
uint8_t DIN = 11;
uint8_t CS = 9;
uint8_t CLK = 13;
#define NUMBER_OF_MATRIX_ARRAYS 36
LedControl lc=LedControl(CS, NUMBER_OF_MATRIX_ARRAYS);
/**********************************************************************/
void setup() {
Serial.begin(115200);
for (uint8_t i = 0; i < NUMBER_OF_MATRIX_ARRAYS; i++) {
lc.shutdown(i, false);
lc.setIntensity(i, 0);
lc.clearDisplay(i);
}
}
/**********************************************************************/
void PrintChar(uint8_t DisplayNumber, char s) {
char inArray[8];
for (uint8_t i=0; i<8; i++)
inArray[i] = pgm_read_byte(&font8x8[s][i]);
for(uint8_t i = 0; i < 8; i++) {
lc.setRow (DisplayNumber, i, inArray[i]);
}
}
/*************************************************************************/
void loop() {
char DataString[] = "00ABCDEFGHIJKLMNOPQRSTUVWXZ012345678";
char ClearString[] = " ";
for (uint8_t j = 0; j < NUMBER_OF_MATRIX_ARRAYS; j++)
PrintChar(j , DataString[j]);
delay(500);
for (uint8_t j = 0; j < NUMBER_OF_MATRIX_ARRAYS; j++)
PrintChar(j , ClearString[j]);
delay(500);
}