UNO r4 wifi Led matrix

HI there can anyone help with why my code isnt working

ive at the functions being call at the right time at stuff but it either wont dispaly at all or errors on complie

 #ifndef LEDCONTROL_H
#define LEDCONTROL_H

#include <Arduino_LED_Matrix.h>

// Dimensions of the built-in LED matrix
#define MATRIX_WIDTH 12
#define MATRIX_HEIGHT 8

// Create an instance of the LED matrix
LEDMatrix matrix(MATRIX_WIDTH, MATRIX_HEIGHT);

// Initialize the LED matrix
inline void initLEDs() {
  matrix.begin(); // Initialize the matrix
  matrix.clear(); // Clear the display
  matrix.show();  // Apply the changes
}

// Set an individual pixel
inline void setPixelViewing(int row, int col, uint32_t color) {
  if (row < 0 || row >= MATRIX_HEIGHT || col < 0 || col >= MATRIX_WIDTH) return;
  matrix.drawPixel(col, row, color); // Note: column and row order
  matrix.show();                     // Apply the changes
}

// Pump ON image
static uint32_t pumpOnImage[8][12] = {
  {0x000000, 0x00FF00, 0x00FF00, 0x00FF00, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000},
  {0x000000, 0x00FF00, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000},
  {0x000000, 0x00FF00, 0x00FF00, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000},
  {0x000000, 0x00FF00, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000},
  {0x000000, 0x00FF00, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000},
  {0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000},
  {0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000},
  {0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000},
};

// Pump OFF image
static uint32_t pumpOffImage[8][12] = {
  {0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000},
  {0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000},
  {0x000000, 0xFF0000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000},
  {0x000000, 0x000000, 0xFF0000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000},
  {0x000000, 0x000000, 0x000000, 0xFF0000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000},
  {0x000000, 0x000000, 0x000000, 0x000000, 0xFF0000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000},
  {0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0xFF0000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000},
  {0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000},
};

// Display the Pump ON image
inline void displayPumpOnSymbol() {
  matrix.clear();
  for (int row = 0; row < 8; row++) {
    for (int col = 0; col < 12; col++) {
      matrix.drawPixel(col, row, pumpOnImage[row][col]);
    }
  }
  matrix.show();
}

// Display the Pump OFF image
inline void displayPumpOffSymbol() {
  matrix.clear();
  for (int row = 0; row < 8; row++) {
    for (int col = 0; col < 12; col++) {
      matrix.drawPixel(col, row, pumpOffImage[row][col]);
    }
  }
  matrix.show();
}

#endif // LEDCONTROL_H 

Error

In file included from /run/arduino/sketches/Solar_Drip_Blueberries_jan18a/PumpControl.h:8:0,
                 from /run/arduino/sketches/Solar_Drip_Blueberries_jan18a/Solar_Drip_Blueberries_jan18a.ino:5:
/run/arduino/sketches/Solar_Drip_Blueberries_jan18a/LEDControl.h:11:1: error: 'LEDMatrix' does not name a type
 LEDMatrix matrix(MATRIX_WIDTH, MATRIX_HEIGHT);
 ^~~~~~~~~
/run/arduino/sketches/Solar_Drip_Blueberries_jan18a/LEDControl.h: In function 'void initLEDs()':
/run/arduino/sketches/Solar_Drip_Blueberries_jan18a/LEDControl.h:15:3: error: 'matrix' was not declared in this scope
   matrix.begin(); // Initialize the matrix
   ^~~~~~
/run/arduino/sketches/Solar_Drip_Blueberries_jan18a/LEDControl.h:15:3: note: suggested alternative: 'trim'
   matrix.begin(); // Initialize the matrix
   ^~~~~~
   trim
/run/arduino/sketches/Solar_Drip_Blueberries_jan18a/LEDControl.h: In function 'void setPixelViewing(int, int, uint32_t)':
/run/arduino/sketches/Solar_Drip_Blueberries_jan18a/LEDControl.h:23:3: error: 'matrix' was not declared in this scope
   matrix.drawPixel(col, row, color); // Note: column and row order
   ^~~~~~
/run/arduino/sketches/Solar_Drip_Blueberries_jan18a/LEDControl.h:23:3: note: suggested alternative: 'trim'
   matrix.drawPixel(col, row, color); // Note: column and row order
   ^~~~~~
   trim
/run/arduino/sketches/Solar_Drip_Blueberries_jan18a/LEDControl.h: In function 'void displayPumpOnSymbol()':
/run/arduino/sketches/Solar_Drip_Blueberries_jan18a/LEDControl.h:53:3: error: 'matrix' was not declared in this scope
   matrix.clear();
   ^~~~~~
/run/arduino/sketches/Solar_Drip_Blueberries_jan18a/LEDControl.h:53:3: note: suggested alternative: 'trim'
   matrix.clear();
   ^~~~~~
   trim
/run/arduino/sketches/Solar_Drip_Blueberries_jan18a/LEDControl.h: In function 'void displayPumpOffSymbol()':
/run/arduino/sketches/Solar_Drip_Blueberries_jan18a/LEDControl.h:64:3: error: 'matrix' was not declared in this scope
   matrix.clear();
   ^~~~~~
/run/arduino/sketches/Solar_Drip_Blueberries_jan18a/LEDControl.h:64:3: note: suggested alternative: 'trim'
   matrix.clear();
   ^~~~~~
   trim
Multiple libraries were found for "RTC.h"
  Used: /run/arduino/directories-data/packages/arduino/hardware/renesas_uno/1.3.1/libraries/RTC
  Not used: /run/arduino/directories-data/internal/M5Core2_0.2.0_b8c417594bcb0714
  Not used: /run/arduino/directories-data/internal/M5StickC_0.3.0_a99c11f2c0b70886
  Not used: /run/arduino/directories-data/internal/M5StickCPlus_0.1.0_04b6c4774fdf0e9c
  Not used: /run/arduino/directories-data/internal/M5Station_0.0.1_59c962b74b2e5439
Multiple libraries were found for "NTPClient.h"
  Used: /run/arduino/directories-data/internal/NTPClient_3.2.1_2a5cb6396268ddb9
  Not used: /run/arduino/directories-data/internal/ESP8266_Weather_Station_2.3.0_87d62dd775e2e673
  Not used: /run/arduino/directories-data/internal/iSYNC_BC95_Arduino_0.8.4_18489cf4800aee8a
  Not used: /run/arduino/directories-data/internal/microgear-nbiot_0.8.0_c5678e6ebc44457c
LEDMatrix matrix(MATRIX_WIDTH, MATRIX_HEIGHT);

Should be
ArduinoLEDMatrix matrix(MATRIX_WIDTH, MATRIX_HEIGHT);

#include <Arduino_LED_Matrix.h>

Wrong class?
Wrong liberary?

In a Arduino_LED_Matrix.h what I find, the class is named:

ArduinoLEDMatrix

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.