LED Matrix MX72 19 : how to display 2 digits


As i am just a beginner with arduino, i try to figure out a few problems with LED matrix 7219 4 in 1.

I just post a clue to help other beginners https://forum.arduino.cc/index.php?topic=560635.0

But now, i am facing a bigger problem and i would appreciate a bit of help.

I am just trying to put a 2 digit number on this led matrix

I must admit that i am a bit lost

Here is my code:

#include <MD_MAX72xx.h>
#include <SPI.h>

// Turn on debug statements to the serial output
#define  DEBUG  1

#if  DEBUG
#define PRINT(s, x) { Serial.print(F(s)); Serial.print(x); }
#define PRINTS(x) Serial.print(F(x))
#define PRINTD(x) Serial.println(x, DEC)

#define PRINT(s, x)
#define PRINTS(x)
#define PRINTD(x)


// 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 MAX_DEVICES  4

#define CLK_PIN   13  // or SCK
#define DATA_PIN  11  // or MOSI
#define CS_PIN    10  // or SS

// SPI hardware interface

// We always wait a bit between updates of the display
#define  DELAYTIME  100  // in milliseconds

//____________ should be displayed ; A goes from 0 to 30

int NumA;

void showNum(void)


 for ( NumA=0; NumA<30; NumA++)


    mx.setChar(COL_SIZE-2, NumA);

void setup() {


#if  DEBUG

void loop() {
  // put your main code here, to run repeatedly:
#if 1



And it gives me in hexadecimal but not as figures…

Thanks a lot in advance

The ASCII character for with codes 0 to 9 is not the same as the ASCII character '0' to '9'.

To get '0' to '9', add the code '0' to the number:

char c = i + '0';

Once you get to 2 characters (number > 9) you will need to treat them separately.

So many thanks for your reply

For the moment, i did not succeed to make it work

but i will try to understand what you told me