Werte in Library ändern

Hallo ich habe ein Problem beim anpassen von Werten in einer Library.

Vorab einige Infos:

Verwendetes Board: Mega 2560
Matrix Modul 4 in 1 (also 8x32 Pixel)
Arduino IDE 1.8.5

Da ich dieses Modul als Laufschrift einsetzen möchte, habe ich zum Testen die "Parola" Library benutzt.
Zum austesten habe ich die mitgelieferten Sketche "Parola_Hello-World" etc. benutzt. Auf einigen Websites zu Parola habe ich gelesen das man in der "MD_MAX72XX.h" bestimmte Werte ändern muss damit es mit dem entsprechendem Matrix-Modul funktioniert.

Beispiel:

/**
 \def USE_PAROLA_HW
 Set to 1 (default) to use the Parola hardware modules. The
 software was originally designed to operate with this hardware type.
 */
#define	USE_PAROLA_HW	0

/**
 \def USE_GENERIC_HW
 Set to 1 to use 'generic' hardware modules commonly available, with
 connectors at the top and bottom of the PCB, available from many sources.
 */
#define	USE_GENERIC_HW	1

/**
 \def USE_ICSTATION_HW
 Set to 1 to use ICStation DIY hardware module kits available from
 http://www.icstation.com/product_info.php?products_id=2609#.UxqVJyxWGHs
 This hardware must be set up with the input on the RHS.
 */
#define	USE_ICSTATION_HW	0

/**
 \def USE_FC16_HW
 Set to 1 to use FC16 hardware module kits.
 FC16 modules are similar in format to the ICStation modules but are wired differently.
 Modules are identified by a FC-16 designation on the PCB
  */
#define	USE_FC16_HW	0

/**
 \def USE_OTHER_HW
 Set to 1 to use other hardware not defined above.
 Module 0 (Data In) must be set up on the RHS and the CUSTOM hardware defines
 must be set up in the MD_MAD72xx_lib.h file under for this section, using the HW_Mapper
 utility to work out what the correct values to use are.
 */
#define	USE_OTHER_HW	0

Diese Werte muss man je nach benutzter Hardware (Abhängig vom Hersteller) auf "0" bzw "1" setzten.

Soweit die Theorie...

Ich habe es also wie beschrieben gemacht:

MD_MAX72XX.h mit Editor geöffnet ---> Änderungen gemacht ---> gespeichert ---> Programm in der IDE neu kompiliert ---> auf das Board übertragen. Es tat sich nichts.

Mit dem Befehl #include <MD_MAX72xx.h> (Spitze Klammern) wird doch die "Original"-Library benutzt und mit dem Befehl #include "MD_MAX72xx.h" (Anführungszeichen) wird eine örtliche Kopie der Libray erstellt die man auch mit dem IDE-Befehl "Datei hinzufügen" in einem weiteren Tab öffnen und somit auch leichter bearbeiten kann oder ??

An den Anschlüssen VCC,DIN usw. kann es nicht liegen da ja ältere Programme die noch die "MaxMatrix.h" nutzen laufen.

Was also mache ich falsch? Angeblich soll es ja mit der Parola-Library besser laufen.

Hier noch das "Test-Programm"

// Program to demonstrate the MD_Parola library
//
// Simplest program that does something useful - Hello World!
//
// NOTE: MD_MAX72xx library must be installed and configured for the LED
// matrix type being used. Refer documentation included in the MD_MAX72xx
// library or see this link:
// https://majicdesigns.github.io/MD_MAX72XX/page_hardware.html
//

#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 MAX_DEVICES 4
#define CLK_PIN   13
#define DATA_PIN  11
#define CS_PIN    10

#define  USE_GENERIC_HW  1


// Hardware SPI connection
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// Arbitrary output pins
// MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

void setup(void)
{
  P.begin();
  P.displayText("Hello", PA_CENTER, 0, 0, PA_PRINT, PA_NO_EFFECT);
}

void loop(void)
{
  P.displayAnimate();
}

Hallo,

Also ich nutze das FC16 Modul.

Hier die Änderung auf FC16 in der .h

\def USE_PAROLA_HW
 Set to 1 (default) to use the Parola hardware modules. The
 software was originally designed to operate with this hardware type.
 */
#define	USE_PAROLA_HW	0

/**
 \def USE_GENERIC_HW
 Set to 1 to use 'generic' hardware modules commonly available, with
 connectors at the top and bottom of the PCB, available from many sources.
 */
#define	USE_GENERIC_HW	0

/**
 \def USE_ICSTATION_HW
 Set to 1 to use ICStation DIY hardware module kits available from
 http://www.icstation.com/product_info.php?products_id=2609#.UxqVJyxWGHs
 This hardware must be set up with the input on the RHS.
 */
#define	USE_ICSTATION_HW	  0

/**
 \def USE_FC16_HW
 Set to 1 to use FC16 hardware module kits.
 FC16 modules are similar in format to the ICStation modules but are wired differently.
 Modules are identified by a FC-16 designation on the PCB
  */
#define	USE_FC16_HW	1

/**
 \def USE_OTHER_HW
 Set to 1 to use other hardware not defined above.
 Module 0 (Data In) must be set up on the RHS and the CUSTOM hardware defines
 must be set up in the MD_MAD72xx_lib.h file under for this section, using the HW_Mapper
 utility to work out what the correct values to use are.
 */
#define	USE_OTHER_HW	0

/**
 \def USE_LOCAL_FONT
 Set to 1 (default) to enable local font in this library and enable
 loadChar() and related methods. If the library is just used for
 graphics some FLASH RAM can be saved by not including the code to process
 font data. The font file is stored in PROGMEM.
 */

Hier ein Teil des Programms auch auf FC16 geändert.

// Simplest program that does something useful - Hello World!
//
// NOTE: MD_MAX72xx library must be installed and configured for the LED
// matrix type being used. Refer documentation included in the MD_MAX72xx
// library or see this link:
// https://majicdesigns.github.io/MD_MAX72XX/page_hardware.html
//

#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 MAX_DEVICES 4
#define CLK_PIN   13
#define DATA_PIN  11
#define CS_PIN    10

#define  USE_FC16_HW   1

Vielleicht habe ich ein Verständnis Problem. Genügt es Werte in der .h zu ändern oder muss ich diese nochmal
extra im eigentlichen Programm anführen? Also "define USE_FC16_HW 1"

Mal angenommen der "define" Wert steht in der .h auf "1" und im Programm auf "0" Welcher Wert hat Vorrang? Normalerweise müsste es der Wert im Programm sein oder ?

So ich habe im Programm selbst noch etwas gefunden und geändert was mir vorher
nicht aufgeallen ist.

// HARDWARE SPI
//MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// SOFTWARE SPI
MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

Ich musste von Hardware SPI auf Software SPI stellen, dann läufts.

Dies ändert aber nichts an der vorherigen Fragestellung.

Mal angenommen der "define" Wert steht in der .h auf "1" und im Programm auf "0" Welcher Wert hat Vorrang? Normalerweise müsste es der Wert im Programm sein oder ?

Bajazzo:
Mit dem Befehl #include <MD_MAX72xx.h> (Spitze Klammern) wird doch die "Original"-Library benutzt und mit dem Befehl #include "MD_MAX72xx.h" (Anführungszeichen) wird eine örtliche Kopie der Libray erstellt die man auch mit dem IDE-Befehl "Datei hinzufügen" in einem weiteren Tab öffnen und somit auch leichter bearbeiten kann oder ??

Das wird in deinem Fall nicht funktionieren. Du MUSST die .h Datei im Library-Verzeichnis anpassen.
Diese Anpassungen sind für das Übersetzen der Library selbst. Die wird vollkommen unabhängig von deinem Sketch übersetzt und dabei wird immer die .h Datei im entsprechenen Library Verzeichnis verwendet.
Bei dem was Du machst wird jetzt in deinem Sketch eine andere .h Datei verwendet, als beim Übersetzen der Library. Das kann nicht funktionieren.

OK, es läuft. Ich habe jetzt mal die Parola Beispiel Sketche geladen und ausprobiert.
Mir ist bei einer Sache nicht ganz klar was die Zahlen zu bedeuten haben.

Beispiel:

{ PA_PRINT, "PRINT", 1, 1 },
  { PA_SLICE, "SLICE", 1, 1 },
  { PA_MESH, "MESH", 20, 1 },
  { PA_FADE, "FADE", 20, 1 },
  { PA_WIPE, "WIPE", 5, 1 },

Kann mir jemand mitteilen was die Zahlen hinter der Funktion zu bedeuten hat? Ich nehme an das die
2te Zahl ;in dem Fall "1"; für Display (FC16) 1 steht aber die 1.te kann ich nicht zuordnen.
In der Parola Library habe ich nichts genaus dazu finden können...