Wokwi working, likely going to be limited to 1024 LEDs during testing
This commit is contained in:
@@ -9,5 +9,7 @@ void PlasmaMatrix::execute() {
|
||||
}
|
||||
}
|
||||
|
||||
paletteShift++;
|
||||
|
||||
matrix->requestShow();
|
||||
}
|
||||
24
src/main.cpp
24
src/main.cpp
@@ -8,12 +8,13 @@
|
||||
#include "FastLED.h"
|
||||
#include "LEDHAL.h"
|
||||
#include "LEDHAL2D.h"
|
||||
#include "MatrixAnimation.h"
|
||||
#include "PlasmaMatrix.h"
|
||||
#include "CLEDControllerPhysicalStrip.h"
|
||||
#include "CLEDControllerPhysicalMatrix.h"
|
||||
#include "SmartMatrixPhysicalMatrix.h"
|
||||
|
||||
#define NUMLEDS 24
|
||||
|
||||
#define NUMLEDS 1024
|
||||
|
||||
#ifdef CORE_TEENSY
|
||||
#define COLOR_DEPTH 24 // known working: 24, 48 - If the sketch uses type `rgb24` directly, COLOR_DEPTH must be 24
|
||||
@@ -32,21 +33,24 @@ SMARTMATRIX_ALLOCATE_BACKGROUND_LAYER(backgroundLayer, kMatrixWidth, kMatrixHeig
|
||||
#endif
|
||||
|
||||
CRGB leds[NUMLEDS];
|
||||
CRGB leds2[NUMLEDS];
|
||||
CRGB leds3[NUMLEDS];
|
||||
|
||||
CRGB someColor(255, 255, 255);
|
||||
|
||||
LEDHAL* hal;
|
||||
LEDHAL2D* hal2D;
|
||||
LEDHAL2D* smHAL;
|
||||
|
||||
MatrixAnimation* animation;
|
||||
|
||||
void setup() {
|
||||
CLEDController* controller = &FastLED.addLeds<NEOPIXEL, 6>(leds, NUMLEDS);
|
||||
|
||||
hal = new CLEDControllerPhysicalStrip(controller, "Test Strip");
|
||||
hal2D = new CLEDControllerPhysicalMatrix(controller, "Matrix", ArrangementType::HORIZONTALSCAN, 32, 32);
|
||||
|
||||
animation = new PlasmaMatrix(hal2D, "Plasma Matrix", 10);
|
||||
animation->enable();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// put your main code here, to run repeatedly:
|
||||
animation->update();
|
||||
|
||||
//hal2D->show();
|
||||
|
||||
FastLED.delay(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user