Bonjour a tous , j'ai acheté des matrices led ws2812. Quand je fais un code avec la librarie FastLED_NeoMatrix.h cela fonctionne par contre quand je prend la librairie Neomatrix.h et <Adafruit_NeoPixel.h rien ne se passe. Pas d'erreur dans le code, cela se deversse normalement.
#include <Adafruit_GFX.h>
#include <Adafruit_NeoMatrix.h>
#include <Adafruit_NeoPixel.h>
const int PINMATRIX = 3;
Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(32,8, PINMATRIX,
NEO_MATRIX_TOP + NEO_MATRIX_LEFT+
NEO_MATRIX_COLUMNS + NEO_MATRIX_ZIGZAG,
NEO_GRB + NEO_KHZ800);
uint16_t colors[] = {
matrix.Color(255, 0, 0), matrix.Color(0, 255, 0), matrix.Color(255, 210, 0),matrix.Color(0, 0, 255), matrix.Color(255, 0, 255), matrix.Color(0, 255, 255), matrix.Color(255, 255, 255),matrix.Color(91, 68, 43),matrix.Color(0, 0, 0)
};
static unsigned char play[]={0x00,0x00,0x10,0x18,0x1c,0x18,0x10,0x00};
static unsigned char rond[]={0x00,0x7e,0xff,0xff,0xff,0xff,0xff,0x7e};
static unsigned char sun[]={0x24,0x00,0xbd,0x7e,0x7e,0x7e,0x00,0x00};
static unsigned char mask[]={0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
static unsigned char cloud[]={0x00,0x00,0x00,0x06,0x6f,0xef,0xff,0x7e};
static unsigned char coeur[]={0x00,0x66,0xff,0x7e,0x7e,0x3c,0x18,0x00};
void setup(){
//Ouverture d'un port serie
Serial.begin(115200);
//Initialisation de la matrice de LED
matrix.begin();
matrix.setTextWrap(false);
matrix.setBrightness(1);
matrix.setTextColor(colors[0]);
}
void loop() {
matrix.fillScreen(0); //Efface la matrice de LED
matrix.setTextColor(colors[5]); //Choix de la couleur numero 5 (0, 255, 255)
matrix.setCursor(0, 0); //Curseur en position 0,0 (1ere ligne, 1ere colonne)
matrix.print("Hello");
//Dessine la forme (8x8 pixels) coeur à la position 24,0 avec la couleur numero 0
matrix.drawBitmap(24, 0, coeur, 8,8,colors[0]);
matrix.show(); //on affiche
delay(1000);
}
Merci de votre aide.