help please how to use MD library

I have a problem as all the how toos on youtube for setting up MD_MAX72xx_h show the old set up where you select 0 or 1, but the new library h has

enum moduleType_t
{
PAROLA_HW, ///< Use the Parola style hardware modules.
GENERIC_HW, ///< Use 'generic' style hardware modules commonly available.
ICSTATION_HW, ///< Use ICStation style hardware module.
FC16_HW ///< Use FC-16 style hardware module.
};
I am new to all this but do I have to change this and what too I am using an FC16 ?? with a MAX7219

I understand this is maybe a simple answer but I as I say a noob to all this.

I am using a MEGA 2560 and matrix HW-692 which I think is FC16? but I just get all the LED light permanently when I run the program?

any help would be most apreciated I did post on another thread but I think it was ignored as an old thread?

You change this in the sketch now, no need to edit the library header file.

You can read about this in the library documentation in the docs folder of the library.

No damage if you choose the wrong matrix type, you just get some transformation (upside down, back to front, etc) of text when it runs.

Thank you but does that mean I just change it to

enum moduleType_t
{ FC16_HW };

I am new to this programming lark so a tad confused

or do I leave that as is and as I have already done edit the sketch to FC16_HW? if so then I will have to look and see what else can be the problem

#define HARDWARE_TYPE MD_MAX72XX::FC16_HW
#define MAX_DEVICES 4
#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10

does that mean I just change it to

No because that would mean changing the library. The sketch is the code you write.

I leave that as is and as I have already done edit the sketch to FC16_HW

Yes, exactly.

If the modules still don't work, typical problems are:

  1. Not wired correctly. The pins are listed as the SPI pins for an Arduino Uno. If you have a Mega the SPI pin numbers will be different, OR you need to make sure you use the alternative method for creating the object (also in the code, commented out).
  2. Modules are inserted at 180 degrees from what they should be (if they are removable)
  3. Power supply not powerful enough to power the modules.

Thank you, Marco

I will change the pins defined to 30,31 and 33 and see if that helps, but I thought the mega would be fine still using pins 10,11,13 the led module is a single line of 4 8x8 modules.

I thought it would be so simple ;-(

Well no change time to leave it I will wait till I get a nano or an uno and then retry it, but I am not sure that is the problem, the LED cluster I purchased is this one

That is indeed the FC-16 display.

If you are having problems, you should be using software SPI.

This should be in your code:

// 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);

Note where the "//" are and are not!

Paul__B:
That is indeed the FC-16 display.

If you are having problems, you should be using software SPI.

This should be in your code:

// 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);



Note where the "//" are and are **not**!

That moves on a tad, it starts but scrolling up or down to fast for me to read, but after a time it then goes to all leds on again and stays there unless I power every thing down for a few moments, so definately a change but still not sorted I will post the whole code I am using

Parola_Scrollingmod.ino (4.48 KB)

I will change the pins defined to 30,31 and 33

And, although you don't say it, move the actual wires as well ...

marco_c:
And, although you don't say it, move the actual wires as well ...

I did but no different so went back to 10,11,13. I am obviously doing something wrong I guess I can not understand why it did something then went full leds and stayed there even when reseting the mega, maybe I am doing something wrong or missing something in the program, back to reading Arduino for Dummies.

Barney100:
That moves on a tad, it starts but scrolling up or down to fast for me to read, but after a time it then goes to all leds on again and stays there unless I power every thing down for a few moments,

Hang on! So it is actually displaying text?

Ipso facto, if it is displaying text, then the hardware connections and the initialisation code are completely correct. :sunglasses:

What happens next is entirely a matter of how your "loop()" code uses the Parola library, your original concerns are solved. :roll_eyes:

Paul__B:
Hang on! So it is actually displaying text?

Ipso facto, if it is displaying text, then the hardware connections and the initialisation code are completely correct. :sunglasses:

What happens next is entirely a matter of how your "loop()" code uses the Parola library, your original concerns are solved. :roll_eyes:

Sort of but the text should go left to right not up and down (rolling) and like I say it locks up showing all reds after about 15 seconds, so yes we have something but not at all right. But I will persevere, and with help and suggestions I am sure I can get it to work, just might take a while, and at my age a while might be too long :sunglasses:

OK, you see text, stick with the connections and the initialisation code that gave you that, you can forget about those details and work on your loop() code.

The code you posted (after you dais it had been changed) still had the GENERIC hardware set.

#define HARDWARE_TYPE MD_MAX72XX::GENERIC_HW

This would cause it to scroll in odd directions if your hardware is FC-16.
Other than that, the rest of the code is the standard example that should work.

Just on a side note

You can print the enum elements to see which value they represent. For the enum that you posted, the results will be 0, 1 and 2.

You might need a cast when printing, can't test.

sterretje:
You can print the enum elements to see which value they represent. For the enum that you posted, the results will be 0, 1 and 2.

You might need a cast when printing, can't test.

And frankly, even for me, that is gobbledegook!

I have ordered an UNO R3 and will when it arrives try it with that until it arrives I have given up. with using the keyestudio Mega 2560 R3. I have tried multiple variations of digital outputs, and checking everything, and I can not see what is wrong :frowning:

A Nano would be more practical. :roll_eyes:

Paul why that I do not understand as the mega 2560 is virtually the same but more 54 digital outputs as far as I can see