Hello all,
I have the "MAX7219 dot matrix 4 in 1 module", I have tried to create a Greek 'font' by using the "Parola MD_MAX72XX Font Builder v2" (attached). I did it but there is a weird spade or arrow-like character that gets "printed" next to every character I print. I have searched around but found nothing regarding this issue. Please see code below.
Could anyone help with determining what is causing this? Hopefully, with your help, I can find a way to eliminate this.
// Program to exercise the MD_Parola library
//
// MD_MAX72XX library can be found at https://github.com/MajicDesigns/MD_MAX72XX
//
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>
// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may
// need to be adapted
#define HARDWARE_TYPE MD_MAX72XX::ICSTATION_HW
#define MAX_DEVICES 4
#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10
// HARDWARE SPI
MD_Parola P = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);
// SOFTWARE SPI
//MD_Parola P = MD_Parola(HARDWARE_TYPE, DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
#define PAUSE_TIME 1000
// Turn on debug statements to the serial output
#define DEBUG 0
#if DEBUG
#define PRINT(s, x) { Serial.print(F(s)); Serial.print(x); }
#define PRINTS(x) Serial.print(F(x))
#define PRINTX(x) Serial.println(x, HEX)
#else
#define PRINT(s, x)
#define PRINTS(x)
#define PRINTX(x)
#endif
uint8_t Alpha[] = { 5, 126, 9, 9, 9, 126 };
uint8_t alpha[] = { 5, 56, 68, 68, 56, 68 };
uint8_t Beta [] = { 5, 127, 73, 73, 73, 54 };
uint8_t beta [] = { 5, 254, 73, 77, 90, 32 };
uint8_t Gamma[] = { 5, 127, 1, 1, 1, 1 };
uint8_t gamma[] = { 5, 4, 104, 144, 104, 4 };
uint8_t Delta[] = { 5, 112, 76, 67, 76, 112 };
uint8_t delta[] = { 5, 38, 90, 82, 34, 0 };
uint8_t Epsil[] = { 5, 127, 73, 73, 65, 65 };
uint8_t epsil[] = { 5, 40, 84, 84, 68, 0 };
uint8_t Zeta [] = { 5, 97, 81, 73, 69, 67 };
uint8_t zeta [] = { 5, 20, 172, 68, 4, 0 };
uint8_t Heta [] = { 5, 127, 8, 8, 8, 127 };
uint8_t heta [] = { 5, 4, 56, 4, 4, 248 };
uint8_t Theta[] = { 5, 62, 73, 73, 73, 62 };
uint8_t theta[] = { 5, 0, 56, 84, 56, 0 };
uint8_t Iota [] = { 5, 0, 65, 127, 65, 0 };
uint8_t iota [] = { 5, 0, 60, 64, 32, 0 };
uint8_t Kappa[] = { 5, 127, 8, 20, 34, 65 };
uint8_t kappa[] = { 5, 0, 124, 16, 40, 68 };
uint8_t Lamda[] = { 5, 112, 12, 3, 12, 112 };
uint8_t lamda[] = { 5, 68, 34, 30, 32, 64 };
uint8_t Mi [] = { 5, 127, 2, 4, 2, 127 };
uint8_t mi [] = { 5, 64, 126, 32, 30, 32 };
uint8_t Ni [] = { 5, 127, 2, 12, 48, 127 };
uint8_t ni [] = { 5, 12, 48, 64, 48, 12 };
uint8_t Ksi [] = { 5, 65, 73, 73, 73, 65 };
uint8_t ksi [] = { 5, 0, 1, 37, 219, 9 };
uint8_t Omicr[] = { 5, 126, 129, 129, 129, 126 };
uint8_t omicr[] = { 5, 0, 56, 68, 68, 56 };
uint8_t Pi [] = { 5, 127, 1, 1, 1, 127 };
uint8_t pi [] = { 5, 8, 120, 8, 120, 8 };
uint8_t Rho [] = { 5, 0, 127, 9, 9, 6 };
uint8_t rho [] = { 5, 0, 124, 20, 28, 0 };
uint8_t Sigma[] = { 5, 99, 85, 73, 65, 99 };
uint8_t sigma[] = { 5, 48, 72, 72, 56, 8 };
uint8_t Taf [] = { 5, 1, 1, 127, 1, 1 };
uint8_t taf [] = { 5, 16, 16, 240, 16, 16 };
uint8_t Ypsil[] = { 5, 1, 6, 120, 6, 1 };
uint8_t ypsil[] = { 5, 0, 112, 128, 128, 112 };
uint8_t Phi [] = { 5, 12, 18, 255, 18, 12 };
uint8_t phi [] = { 5, 16, 40, 252, 40, 16 };
uint8_t Chi [] = { 5, 194, 44, 16, 44, 194 };
uint8_t chi [] = { 5, 136, 80, 32, 80, 136 };
uint8_t Psi [] = { 5, 6, 8, 127, 8, 6 };
uint8_t psi [] = { 5, 24, 32, 248, 32, 24 };
uint8_t Omega[] = { 5, 78, 81, 81, 81, 78 };
uint8_t omega[] = { 5, 96, 128, 64, 128, 96 };
// Global variables
typedef struct
{
uint8_t spacing; // character spacing
char *msg; // message to display
} msgDef_t;
msgDef_t M[] =
{
{ 1, "Α α Β β Γ γ Δ δ Ε ε Ζ ζ Η η Θ θ Ι ι Κ κ Λ λ Μ μ Ν ν Ξ ξ Ο ο Π π Ρ ρ Σ σ Τ τ Υ υ Φ φ Χ χ Ψ ψ Ω ω" },
};
#define MAX_STRINGS (sizeof(M)/sizeof(M[0]))
void setup(void)
{
Serial.begin(57600);
PRINTS("\n[Parola User Char Demo]");
P.begin();
P.setSpeed(150);
P.addChar('Α', Alpha);
P.addChar('α', alpha);
P.addChar('Β', Beta);
P.addChar('β', beta);
P.addChar('Γ', Gamma);
P.addChar('γ', gamma);
P.addChar('Δ', Delta);
P.addChar('δ', delta);
P.addChar('Ε', Epsil);
P.addChar('ε', epsil);
P.addChar('Ζ', Zeta);
P.addChar('ζ', zeta);
P.addChar('Η', Heta);
P.addChar('η', heta);
P.addChar('Θ', Theta);
P.addChar('θ', theta);
P.addChar('Ι', Iota);
P.addChar('ι', iota);
P.addChar('Κ', Kappa);
P.addChar('κ', kappa);
P.addChar('Λ', Lamda);
P.addChar('λ', lamda);
P.addChar('Μ', Mi);
P.addChar('μ', mi);
P.addChar('Ν', Ni);
P.addChar('ν', ni);
P.addChar('Ξ', Ksi);
P.addChar('ξ', ksi);
P.addChar('Ο', Omicr);
P.addChar('ο', omicr);
P.addChar('Π', Pi);
P.addChar('π', pi);
P.addChar('Ρ', Rho);
P.addChar('ρ', rho);
P.addChar('Σ', Sigma);
P.addChar('σ', sigma);
P.addChar('Τ', Taf);
P.addChar('τ', taf);
P.addChar('Υ', Ypsil);
P.addChar('υ', ypsil);
P.addChar('Φ', Phi);
P.addChar('φ', phi);
P.addChar('Χ', Chi);
P.addChar('χ', chi);
P.addChar('Ψ', Psi);
P.addChar('ψ', psi);
P.addChar('Ω', Omega);
P.addChar('ω', omega);
P.setCharSpacing(M[0].spacing);
P.displayText(M[0].msg, PA_CENTER, P.getSpeed(), PAUSE_TIME, PA_SCROLL_LEFT, PA_SCROLL_LEFT);
}
void loop(void)
{
static uint8_t n = 1;
if (P.displayAnimate())
{
P.setTextBuffer(M[n].msg);
P.setCharSpacing(M[n].spacing);
P.displayReset();
n = (n + 1) % MAX_STRINGS;
}
}