Both SmartMatrix_GFX and Framebuffer_GFX are installed.
In my Arduino Library I have both “Framebuffer_GFX-master” and “SmartMatrix_GFX-master”
I’m using the following, Teensy 3.5, SmartLedShield V4 and a P10 RGB 16x32 matrix panel 1/4scan with HUB 75.
my code starts like this. I’ve removed some snippets to make it more readable
#include <Adafruit_GFX.h>
#include <SmartMatrix_GFX.h>
#include <SmartLEDShieldV4.h>
#include <SmartMatrix3.h>
#define COLOR_DEPTH 24
const uint8_t kMatrixWidth = 32;
const uint8_t kMatrixHeight = 16;
const uint8_t kPanelType = SMARTMATRIX_HUB75_8ROW_32COL_MOD4SCAN_V3;
const uint8_t kRefreshDepth = 36;
const uint8_t kDmaBufferRows = 4;
const uint8_t kMatrixOptions = (SMARTMATRIX_OPTIONS_NONE); /
const uint8_t kBackgroundLayerOptions = (SM_BACKGROUND_OPTIONS_NONE);
SMARTMATRIX_ALLOCATE_BUFFERS(matrix, kMatrixWidth, kMatrixHeight, kRefreshDepth, kDmaBufferRows, kPanelType, kMatrixOptions);
SMARTMATRIX_ALLOCATE_BACKGROUND_LAYER(backgroundLayer, kMatrixWidth, kMatrixHeight, COLOR_DEPTH, kBackgroundLayerOptions);
my void setup() looks like this
matrix.addLayer(&backgroundLayer);
matrix.begin();
matrix.setBrightness(128);
backgroundLayer.swapBuffers();
Serial4.begin(9600);
pinMode(24,OUTPUT);
Some errors
In file included from C:\Users\printing\Documents\Arduino\libraries\Framebuffer_GFX-master/Framebuffer_GFX.h:33:0,
from C:\Users\printing\Documents\Arduino\libraries\SmartMatrix_GFX-master/SmartMatrix_GFX.h:23,
from C:\Users\printing\AppData\Local\Temp\arduino_modified_sketch_529434\Smartmatrixwork1.ino:11:
C:\Users\printing\Documents\Arduino\libraries\FastLED-master/FastLED.h:14:21: note: #pragma message: FastLED version 3.002.010
pragma message “FastLED version 3.002.010”
Smartmatrixwork1:327: error: ‘class SmartMatrix3<36, 32, 16, 10u, 0u>’ has no member named ‘fillScreen’
matrix.fillScreen(0);
^
Smartmatrixwork1:329: error: ‘class SmartMatrix3<36, 32, 16, 10u, 0u>’ has no member named ‘fillTriangle’
matrix.fillTriangle(0 + x, 7, 5 + x, 2, 5 + x, 13, matrix.Color333(4, 2, 0));
^
Smartmatrixwork1:329: error: ‘class SmartMatrix3<36, 32, 16, 10u, 0u>’ has no member named ‘Color333’
matrix.fillTriangle(0 + x, 7, 5 + x, 2, 5 + x, 13, matrix.Color333(4, 2, 0));
^
Smartmatrixwork1:330: error: ‘class SmartMatrix3<36, 32, 16, 10u, 0u>’ has no member named ‘fillRect’
matrix.fillRect(6 + x, 4, 6, 8, matrix.Color333(4, 2, 0));
^
Smartmatrixwork1:330: error: ‘class SmartMatrix3<36, 32, 16, 10u, 0u>’ has no member named ‘Color333’
matrix.fillRect(6 + x, 4, 6, 8, matrix.Color333(4, 2, 0));
Does Smartmatrix_GFX need to be defined somewhere?
In the Smartmatrixd_GFX example I see this snippet of code
#define mw kMatrixWidth
#define mh kMatrixHeight
#define NUMMATRIX (kMatrixWidth*kMatrixHeight)
CRGB *matrixleds;
void show_callback();
SmartMatrix_GFX *matrix = new SmartMatrix_GFX(matrixleds, mw, mh, show_callback);
// Sadly this callback function must be copied around with this init code
void show_callback() {
backgroundLayer.swapBuffers(true);
matrixleds = (CRGB *)backgroundLayer.backBuffer();
matrix->newLedsPtr(matrixleds);
}
Also I’ve looked into SmartMatrix_GFX.cpp to find this
SmartMatrix_GFX::SmartMatrix_GFX(CRGB leds, uint8_t w, uint8_t h, void ( showptr)()):
Framebuffer_GFX(leds, w, h, showptr) {
}
I’m thinking I need to define it, but then do I have to refactor all the “matrix.” instructions to something else?
Like I said I’m missing something, and to me it’s not clear.