matrice 8x8 avec un driver built-in et l'affichage d'un message déroulant.

Bonjour,
J'ai encore des soucis avec un sketch qui me renvoit des codes d'erreur que je ne comprends pas. Il s'agitd'un projet utilisant une matrice 8x8 avec un driver built-in et l'affichage d'un message déroulant.
Le message d'erreur est le suivant:
Arduino : 1.8.5 (Windows 10), Carte : "Arduino/Genuino Uno"

C:\Users\franck\AppData\Local\Temp\ccasvxnh.ltrans0.ltrans.o: In function `printCharWithShift(char, int) [clone .part.0]':

C:\Users\franck\Desktop\SketchesArduinoVol2\08 Sketches and Libraries\sketches_4_LED_Scrolling_Marquee/_4_LED_Scrolling_Marquee.ino:130: undefined reference to `MaxMatrix::writeSprite(int, int, unsigned char const*)'

C:\Users\franck\Desktop\SketchesArduinoVol2\08 Sketches and Libraries\sketches_4_LED_Scrolling_Marquee/_4_LED_Scrolling_Marquee.ino:131: undefined reference to `MaxMatrix::setColumn(unsigned char, unsigned char)'

C:\Users\franck\Desktop\SketchesArduinoVol2\08 Sketches and Libraries\sketches_4_LED_Scrolling_Marquee/_4_LED_Scrolling_Marquee.ino:134: undefined reference to `MaxMatrix::shiftLeft(bool, bool)'

C:\Users\franck\AppData\Local\Temp\ccasvxnh.ltrans0.ltrans.o: In function `__static_initialization_and_destruction_0':

C:\Users\franck\Desktop\SketchesArduinoVol2\08 Sketches and Libraries\sketches_4_LED_Scrolling_Marquee/_4_LED_Scrolling_Marquee.ino:104: undefined reference to `MaxMatrix::MaxMatrix(unsigned char, unsigned char, unsigned char, unsigned char)'

C:\Users\franck\AppData\Local\Temp\ccasvxnh.ltrans0.ltrans.o: In function `setup':

C:\Users\franck\Desktop\SketchesArduinoVol2\08 Sketches and Libraries\sketches_4_LED_Scrolling_Marquee/_4_LED_Scrolling_Marquee.ino:109: undefined reference to `MaxMatrix::init()'

C:\Users\franck\Desktop\SketchesArduinoVol2\08 Sketches and Libraries\sketches_4_LED_Scrolling_Marquee/_4_LED_Scrolling_Marquee.ino:110: undefined reference to `MaxMatrix::setIntensity(unsigned char)'

C:\Users\franck\AppData\Local\Temp\ccasvxnh.ltrans0.ltrans.o: In function `loop':

C:\Users\franck\Desktop\SketchesArduinoVol2\08 Sketches and Libraries\sketches_4_LED_Scrolling_Marquee/_4_LED_Scrolling_Marquee.ino:121: undefined reference to `MaxMatrix::shiftLeft(bool, bool)'

collect2.exe: error: ld returned 1 exit status

exit status 1
Erreur de compilation pour la carte Arduino/Genuino Uno

Ce rapport pourrait être plus détaillé avec
l'option "Afficher les résultats détaillés de la compilation"
activée dans Fichier -> Préférences.

ledScrolingMarquee.txt (10.3 KB)

Je vois un problème

    printCharWithShift(c, 100);

c est declaré comme byte
mais la fonction printCharWithShift s'attend un char!

STP modifie ton post pour insérer (entre balises) ton code car c'est vrai que un code en pièce jointe ça c'est n'ai pas facile. Tu verra que tu aura des meilleures réponses!

C'est étonnant, le constructeur qu'on trouve dans le fichier MaxMatrix.h utilise des byte

 MaxMatrix(byte data, byte load, byte clock, byte num);

Tu utilises des int, ce qui pose peut-être un problème, mais l'exemple de la bibliothèque utilisée aussi des int... Bizarre

Merci,
Je vais réécrire mon post avec les balises .
Je pense qu'il y a un problème avec la librairie MaxMatrix.
Franck

Bonjour, je réécris mon post en esperant qu'il répond à l'étiquette du forum.

le code est le suivant:

#include <MaxMatrix.h>

PROGMEM const unsigned char CH[] = {
3, 8, B00000000, B00000000, B00000000, B00000000, B00000000, // space
1, 8, B01011111, B00000000, B00000000, B00000000, B00000000, // !
3, 8, B00000011, B00000000, B00000011, B00000000, B00000000, // "
5, 8, B00010100, B00111110, B00010100, B00111110, B00010100, // #
4, 8, B00100100, B01101010, B00101011, B00010010, B00000000, // $
5, 8, B01100011, B00010011, B00001000, B01100100, B01100011, // %
5, 8, B00110110, B01001001, B01010110, B00100000, B01010000, // &
1, 8, B00000011, B00000000, B00000000, B00000000, B00000000, // '
3, 8, B00011100, B00100010, B01000001, B00000000, B00000000, // (
3, 8, B01000001, B00100010, B00011100, B00000000, B00000000, // )
5, 8, B00101000, B00011000, B00001110, B00011000, B00101000, // *
5, 8, B00001000, B00001000, B00111110, B00001000, B00001000, // +
2, 8, B10110000, B01110000, B00000000, B00000000, B00000000, // ,
4, 8, B00001000, B00001000, B00001000, B00001000, B00000000, // -
2, 8, B01100000, B01100000, B00000000, B00000000, B00000000, // .
4, 8, B01100000, B00011000, B00000110, B00000001, B00000000, // /
4, 8, B00111110, B01000001, B01000001, B00111110, B00000000, // 0
3, 8, B01000010, B01111111, B01000000, B00000000, B00000000, // 1
4, 8, B01100010, B01010001, B01001001, B01000110, B00000000, // 2
4, 8, B00100010, B01000001, B01001001, B00110110, B00000000, // 3
4, 8, B00011000, B00010100, B00010010, B01111111, B00000000, // 4
4, 8, B00100111, B01000101, B01000101, B00111001, B00000000, // 5
4, 8, B00111110, B01001001, B01001001, B00110000, B00000000, // 6
4, 8, B01100001, B00010001, B00001001, B00000111, B00000000, // 7
4, 8, B00110110, B01001001, B01001001, B00110110, B00000000, // 8
4, 8, B00000110, B01001001, B01001001, B00111110, B00000000, // 9
2, 8, B01010000, B00000000, B00000000, B00000000, B00000000, // :
2, 8, B10000000, B01010000, B00000000, B00000000, B00000000, // ;
3, 8, B00010000, B00101000, B01000100, B00000000, B00000000, // <
3, 8, B00010100, B00010100, B00010100, B00000000, B00000000, // =
3, 8, B01000100, B00101000, B00010000, B00000000, B00000000, // >
4, 8, B00000010, B01011001, B00001001, B00000110, B00000000, // ?
5, 8, B00111110, B01001001, B01010101, B01011101, B00001110, // @
4, 8, B01111110, B00010001, B00010001, B01111110, B00000000, // A
4, 8, B01111111, B01001001, B01001001, B00110110, B00000000, // B
4, 8, B00111110, B01000001, B01000001, B00100010, B00000000, // C
4, 8, B01111111, B01000001, B01000001, B00111110, B00000000, // D
4, 8, B01111111, B01001001, B01001001, B01000001, B00000000, // E
4, 8, B01111111, B00001001, B00001001, B00000001, B00000000, // F
4, 8, B00111110, B01000001, B01001001, B01111010, B00000000, // G
4, 8, B01111111, B00001000, B00001000, B01111111, B00000000, // H
3, 8, B01000001, B01111111, B01000001, B00000000, B00000000, // I
4, 8, B00110000, B01000000, B01000001, B00111111, B00000000, // J
4, 8, B01111111, B00001000, B00010100, B01100011, B00000000, // K
4, 8, B01111111, B01000000, B01000000, B01000000, B00000000, // L
5, 8, B01111111, B00000010, B00001100, B00000010, B01111111, // M
5, 8, B01111111, B00000100, B00001000, B00010000, B01111111, // N
4, 8, B00111110, B01000001, B01000001, B00111110, B00000000, // O
4, 8, B01111111, B00001001, B00001001, B00000110, B00000000, // P
4, 8, B00111110, B01000001, B01000001, B10111110, B00000000, // Q
4, 8, B01111111, B00001001, B00001001, B01110110, B00000000, // R
4, 8, B01000110, B01001001, B01001001, B00110010, B00000000, // S
5, 8, B00000001, B00000001, B01111111, B00000001, B00000001, // T
4, 8, B00111111, B01000000, B01000000, B00111111, B00000000, // U
5, 8, B00001111, B00110000, B01000000, B00110000, B00001111, // V
5, 8, B00111111, B01000000, B00111000, B01000000, B00111111, // W
5, 8, B01100011, B00010100, B00001000, B00010100, B01100011, // X
5, 8, B00000111, B00001000, B01110000, B00001000, B00000111, // Y
4, 8, B01100001, B01010001, B01001001, B01000111, B00000000, // Z
2, 8, B01111111, B01000001, B00000000, B00000000, B00000000, // [
4, 8, B00000001, B00000110, B00011000, B01100000, B00000000, // \
2, 8, B01000001, B01111111, B00000000, B00000000, B00000000, // ]
3, 8, B00000010, B00000001, B00000010, B00000000, B00000000, // hat
4, 8, B01000000, B01000000, B01000000, B01000000, B00000000, // _
2, 8, B00000001, B00000010, B00000000, B00000000, B00000000, // `
4, 8, B00100000, B01010100, B01010100, B01111000, B00000000, // a
4, 8, B01111111, B01000100, B01000100, B00111000, B00000000, // b
4, 8, B00111000, B01000100, B01000100, B00101000, B00000000, // c
4, 8, B00111000, B01000100, B01000100, B01111111, B00000000, // d
4, 8, B00111000, B01010100, B01010100, B00011000, B00000000, // e
3, 8, B00000100, B01111110, B00000101, B00000000, B00000000, // f
4, 8, B10011000, B10100100, B10100100, B01111000, B00000000, // g
4, 8, B01111111, B00000100, B00000100, B01111000, B00000000, // h
3, 8, B01000100, B01111101, B01000000, B00000000, B00000000, // i
4, 8, B01000000, B10000000, B10000100, B01111101, B00000000, // j
4, 8, B01111111, B00010000, B00101000, B01000100, B00000000, // k
3, 8, B01000001, B01111111, B01000000, B00000000, B00000000, // l
5, 8, B01111100, B00000100, B01111100, B00000100, B01111000, // m
4, 8, B01111100, B00000100, B00000100, B01111000, B00000000, // n
4, 8, B00111000, B01000100, B01000100, B00111000, B00000000, // o
4, 8, B11111100, B00100100, B00100100, B00011000, B00000000, // p
4, 8, B00011000, B00100100, B00100100, B11111100, B00000000, // q
4, 8, B01111100, B00001000, B00000100, B00000100, B00000000, // r
4, 8, B01001000, B01010100, B01010100, B00100100, B00000000, // s
3, 8, B00000100, B00111111, B01000100, B00000000, B00000000, // t
4, 8, B00111100, B01000000, B01000000, B01111100, B00000000, // u
5, 8, B00011100, B00100000, B01000000, B00100000, B00011100, // v
5, 8, B00111100, B01000000, B00111100, B01000000, B00111100, // w
5, 8, B01000100, B00101000, B00010000, B00101000, B01000100, // x
4, 8, B10011100, B10100000, B10100000, B01111100, B00000000, // y
3, 8, B01100100, B01010100, B01001100, B00000000, B00000000, // z
3, 8, B00001000, B00110110, B01000001, B00000000, B00000000, // {
1, 8, B01111111, B00000000, B00000000, B00000000, B00000000, // |
3, 8, B01000001, B00110110, B00001000, B00000000, B00000000, // }
4, 8, B00001000, B00000100, B00001000, B00000100, B00000000, // ~
};
int data = 8; // Pin connected to DIN pin of MAXIM7219 module
int load = 9; // Pin connected to CS pin of MAXIM7219 module
int clock = 10; // Pin connected to CLK pin of MAXIM7219 module
int maxInUse = 1; // Set the number of matrices you are using
MaxMatrix m(data, load, clock, maxInUse); // Define the module
byte buffer[10];
// Set message to scroll on the screen
char string1[] = " Arduino Project Handbook . . . ";
void setup() {
m.init(); // Start module
m.setIntensity(0);
Serial.begin(9600); // Start serial communication
}
void loop() {
byte c;
while (Serial.available() > 0) {
byte c = Serial.read();
Serial.println(c, DEC);
printCharWithShift(c, 100);
}
delay(100);
m.shiftLeft(false, true);
printStringWithShift(string1, 100);
}
// The remainder of this sketch moves the scrolling characters
// depending on the number of matrices that are attached
void printCharWithShift(char c, int shift_speed) {
if (c < 32) return;
c -= 32;
memcpy_P(buffer, CH + 7*c, 7);
m.writeSprite(maxInUse*8, 0, buffer);
m.setColumn(maxInUse*8 + buffer[0], 0);
for (int i=0; i<buffer[0]+1; i++) {
delay(shift_speed);
m.shiftLeft(false, false);
}
}
void printStringWithShift(char* s, int shift_speed) {
while (*s != 0) {
printCharWithShift(*s, shift_speed);
s++;
}
}
void printString(char* s) {
int col = 0;
while (*s != 0) {
if (*s < 32) continue;
char c = *s - 32;
memcpy_P(buffer, CH + 7*c, 7);
m.writeSprite(col, 0, buffer);
m.setColumn(col + buffer[0], 0);
col += buffer[0] + 1;
s++;
}
}

merci pour votre aide
Franck

codes_erreurs_matrix.txt (8.41 KB)

Quand je compile ton code, je n'ai aucune erreur : par contre, ça peut venir de la manière dont tu as installé la bibliothèque MaxMatrix.

Pour ça, j'ai téléchargé le zip ici et j'ai mis uniquement le répertoire MaxMatrix dans le répertoire libraries de mon dossier arduino.
Si tu as copié l'ensemble de l'archive, tu as un répertoire max7219-master ou max7219, et ce répertoire contient le MaxMatrix : tu déplaces ce dernier dans libraries et tu effaces max7219.

merci +++

Bon, j'ai fais comme tu me l'as dit.

Je me retrouve avec les erreurs suivantes:
Arduino : 1.8.5 (Windows 10), Carte : "Arduino/Genuino Uno"

C:\Users\franck\Desktop\SketchesArduinoVol2\08 Sketches and Libraries\sketches_4_LED_Scrolling_Marquee_4_LED_Scrolling_Marquee.ino:64:62: warning: multi-line comment [-Wcomment]

4, 8, B00000001, B00000110, B00011000, B01100000, B00000000, // \

^
C:\Users\franck\Desktop\SketchesArduinoVol2\08 Sketches and Libraries\sketches_4_LED_Scrolling_Marquee_4_LED_Scrolling_Marquee.ino: In function 'void loop()':
C:\Users\franck\Desktop\SketchesArduinoVol2\08 Sketches and Libraries\sketches_4_LED_Scrolling_Marquee_4_LED_Scrolling_Marquee.ino:114:6: warning: unused variable 'c' [-Wunused-variable]

byte c;

^

C:\Users\franck\AppData\Local\Temp\cclg2edV.ltrans0.ltrans.o: In function printCharWithShift(char, int) [clone .part.0]': C:\Users\franck\Desktop\SketchesArduinoVol2\08 Sketches and Libraries\sketches\_4_LED_Scrolling_Marquee/_4_LED_Scrolling_Marquee.ino:130: undefined reference to MaxMatrix::writeSprite(int, int, unsigned char const*)'
C:\Users\franck\Desktop\SketchesArduinoVol2\08 Sketches and Libraries\sketches_4_LED_Scrolling_Marquee/_4_LED_Scrolling_Marquee.ino:131: undefined reference to MaxMatrix::setColumn(unsigned char, unsigned char)' C:\Users\franck\Desktop\SketchesArduinoVol2\08 Sketches and Libraries\sketches\_4_LED_Scrolling_Marquee/_4_LED_Scrolling_Marquee.ino:134: undefined reference to MaxMatrix::shiftLeft(bool, bool)'
C:\Users\franck\AppData\Local\Temp\cclg2edV.ltrans0.ltrans.o: In function __static_initialization_and_destruction_0': C:\Users\franck\Desktop\SketchesArduinoVol2\08 Sketches and Libraries\sketches\_4_LED_Scrolling_Marquee/_4_LED_Scrolling_Marquee.ino:104: undefined reference to MaxMatrix::MaxMatrix(unsigned char, unsigned char, unsigned char, unsigned char)'
C:\Users\franck\AppData\Local\Temp\cclg2edV.ltrans0.ltrans.o: In function setup': C:\Users\franck\Desktop\SketchesArduinoVol2\08 Sketches and Libraries\sketches\_4_LED_Scrolling_Marquee/_4_LED_Scrolling_Marquee.ino:109: undefined reference to MaxMatrix::init()'
C:\Users\franck\Desktop\SketchesArduinoVol2\08 Sketches and Libraries\sketches_4_LED_Scrolling_Marquee/_4_LED_Scrolling_Marquee.ino:110: undefined reference to MaxMatrix::setIntensity(unsigned char)' C:\Users\franck\AppData\Local\Temp\cclg2edV.ltrans0.ltrans.o: In function loop':
C:\Users\franck\Desktop\SketchesArduinoVol2\08 Sketches and Libraries\sketches_4_LED_Scrolling_Marquee/_4_LED_Scrolling_Marquee.ino:121: undefined reference to `MaxMatrix::shiftLeft(bool, bool)'

collect2.exe: error: ld returned 1 exit status

exit status 1
Erreur de compilation pour la carte Arduino/Genuino Uno

J'avoue que je suis un peu perdu.

Le code de la librairie MAX7219 est_il bien:

/*
 * MaxMatrix
 * Version 1.0 Feb 2013
 * Copyright 2013 Oscar Kin-Chung Au
 */

#ifndef _MaxMatrix_H_
#define _MaxMatrix_H_

#include "Arduino.h"

#define max7219_reg_noop        0x00
#define max7219_reg_digit0      0x01
#define max7219_reg_digit1      0x02
#define max7219_reg_digit2      0x03
#define max7219_reg_digit3      0x04
#define max7219_reg_digit4      0x05
#define max7219_reg_digit5      0x06
#define max7219_reg_digit6      0x07
#define max7219_reg_digit7      0x08
#define max7219_reg_decodeMode  0x09
#define max7219_reg_intensity   0x0a
#define max7219_reg_scanLimit   0x0b
#define max7219_reg_shutdown    0x0c
#define max7219_reg_displayTest 0x0f

class MaxMatrix
{
  private:
    byte data;
    byte load;
    byte clock;
    byte num;
    byte buffer[80];
    
    void reload();
	
  public:
    MaxMatrix(byte data, byte load, byte clock, byte num);
    
    void init();
    void clear();
    void setCommand(byte command, byte value);
    void setIntensity(byte intensity);
    void setColumn(byte col, byte value);
    void setColumnAll(byte col, byte value);
    void setDot(byte col, byte row, byte value);
    void writeSprite(int x, int y, const byte* sprite);
    
    void shiftLeft(bool rotate = false, bool fill_zero = true);
    void shiftRight(bool rotate = false, bool fill_zero = true);
    void shiftUp(bool rotate = false);
    void shiftDown(bool rotate = false);
};

#endif

Je progresse mentalement, merci,
Franck

Oui c'est bien le code de MaxMatrix.h.
Et le .cpp qui va avec ?
Celui-ci : MaxMatrix.cpp

Tu devrais activer l'affichage des infos détaillées à la compilation.
Voir Fichier / Préférences.

comment enregistrer le fichier suivant au format *.cpp?

/*
 * MaxMatrix
 * Version 1.0 Feb 2013
 * Copyright 2013 Oscar Kin-Chung Au
 */


#include "Arduino.h"
#include "MaxMatrix.h"

MaxMatrix::MaxMatrix(byte _data, byte _load, byte _clock, byte _num) 
{
	data = _data;
	load = _load;
	clock = _clock;
	num = _num;
	for (int i=0; i<80; i++)
		buffer[i] = 0;
}

void MaxMatrix::init()
{
	pinMode(data,  OUTPUT);
	pinMode(clock, OUTPUT);
	pinMode(load,  OUTPUT);
	digitalWrite(clock, HIGH); 

	setCommand(max7219_reg_scanLimit, 0x07);      
	setCommand(max7219_reg_decodeMode, 0x00);  // using an led matrix (not digits)
	setCommand(max7219_reg_shutdown, 0x01);    // not in shutdown mode
	setCommand(max7219_reg_displayTest, 0x00); // no display test
	
	// empty registers, turn all LEDs off
	clear();
	
	setIntensity(0x0f);    // the first 0x0f is the value you can set
}

void MaxMatrix::setIntensity(byte intensity)
{
	setCommand(max7219_reg_intensity, intensity);
}

void MaxMatrix::clear()
{
	for (int i=0; i<8; i++) 
		setColumnAll(i,0);
		
	for (int i=0; i<80; i++)
		buffer[i] = 0;
}

void MaxMatrix::setCommand(byte command, byte value)
{
	digitalWrite(load, LOW);    
	for (int i=0; i<num; i++) 
	{
		shiftOut(data, clock, MSBFIRST, command);
		shiftOut(data, clock, MSBFIRST, value);
	}
	digitalWrite(load, LOW);
	digitalWrite(load, HIGH);
}


void MaxMatrix::setColumn(byte col, byte value)
{
	int n = col / 8;
	int c = col % 8;
	digitalWrite(load, LOW);    
	for (int i=0; i<num; i++) 
	{
		if (i == n)
		{
			shiftOut(data, clock, MSBFIRST, c + 1);
			shiftOut(data, clock, MSBFIRST, value);
		}
		else
		{
			shiftOut(data, clock, MSBFIRST, 0);
			shiftOut(data, clock, MSBFIRST, 0);
		}
	}
	digitalWrite(load, LOW);
	digitalWrite(load, HIGH);
	
	buffer[col] = value;
}

void MaxMatrix::setColumnAll(byte col, byte value)
{
	digitalWrite(load, LOW);    
	for (int i=0; i<num; i++) 
	{
		shiftOut(data, clock, MSBFIRST, col + 1);
		shiftOut(data, clock, MSBFIRST, value);
		buffer[col * i] = value;
	}
	digitalWrite(load, LOW);
	digitalWrite(load, HIGH);
}

void MaxMatrix::setDot(byte col, byte row, byte value)
{
    bitWrite(buffer[col], row, value);

	int n = col / 8;
	int c = col % 8;
	digitalWrite(load, LOW);    
	for (int i=0; i<num; i++) 
	{
		if (i == n)
		{
			shiftOut(data, clock, MSBFIRST, c + 1);
			shiftOut(data, clock, MSBFIRST, buffer[col]);
		}
		else
		{
			shiftOut(data, clock, MSBFIRST, 0);
			shiftOut(data, clock, MSBFIRST, 0);
		}
	}
	digitalWrite(load, LOW);
	digitalWrite(load, HIGH);
}

void MaxMatrix::writeSprite(int x, int y, const byte* sprite)
{
	int w = sprite[0];
	int h = sprite[1];
	
	if (h == 8 && y == 0)
		for (int i=0; i<w; i++)
		{
			int c = x + i;
			if (c>=0 && c<80)
				setColumn(c, sprite[i+2]);
		}
	else
		for (int i=0; i<w; i++)
			for (int j=0; j<h; j++)
			{
				int c = x + i;
				int r = y + j;
				if (c>=0 && c<80 && r>=0 && r<8)
					setDot(c, r, bitRead(sprite[i+2], j));
			}
}

void MaxMatrix::reload()
{
	for (int i=0; i<8; i++)
	{
		int col = i;
		digitalWrite(load, LOW);    
		for (int j=0; j<num; j++) 
		{
			shiftOut(data, clock, MSBFIRST, i + 1);
			shiftOut(data, clock, MSBFIRST, buffer[col]);
			col += 8;
		}
		digitalWrite(load, LOW);
		digitalWrite(load, HIGH);
	}
}

void MaxMatrix::shiftLeft(bool rotate, bool fill_zero)
{
	byte old = buffer[0];
	int i;
	for (i=0; i<80; i++)
		buffer[i] = buffer[i+1];
	if (rotate) buffer[num*8-1] = old;
	else if (fill_zero) buffer[num*8-1] = 0;
	
	reload();
}

void MaxMatrix::shiftRight(bool rotate, bool fill_zero)
{
	int last = num*8-1;
	byte old = buffer[last];
	int i;
	for (i=79; i>0; i--)
		buffer[i] = buffer[i-1];
	if (rotate) buffer[0] = old;
	else if (fill_zero) buffer[0] = 0;
	
	reload();
}

void MaxMatrix::shiftUp(bool rotate)
{
	for (int i=0; i<num*8; i++)
	{
		bool b = buffer[i] & 1;
		buffer[i] >>= 1;
		if (rotate) bitWrite(buffer[i], 7, b);
	}
	reload();
}

void MaxMatrix::shiftDown(bool rotate)
{
	for (int i=0; i<num*8; i++)
	{
		bool b = buffer[i] & 128;
		buffer[i] <<= 1;
		if (rotate) bitWrite(buffer[i], 0, b);
	}
	reload();
}

merci

Tu ne dois pas toucher à ces deux fichiers, le h et le cpp. Ils doivent être dans le répertoire arduino / libraries /MaxMatrix
Tu ne dois pas les inclure dans ton code. Tu n'as rien d'autre à faire que écrire ton code, un fichier ino, avec l'IDE arduino.
Au début de ce fichier, il faut une ligne pour dire que tu utilises cette bibliothèque
#include "MaxMatrix.h"
C'est tout. Lorsque tu auras avancé, et si tu as encore des problèmes, poste ton fichier ino sur le forum