Wokwi working, likely going to be limited to 1024 LEDs during testing
This commit is contained in:
parent
c5f0dc66cb
commit
8a00b69e9e
25
diagram.json
Normal file
25
diagram.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"version": 1,
|
||||
"author": "Uri Shaked",
|
||||
"editor": "wokwi",
|
||||
"parts": [
|
||||
{ "type": "board-xiao-esp32-s3", "id": "esp", "top": 1000, "left": 13.78, "attrs": {} },
|
||||
{
|
||||
"id": "neopixels",
|
||||
"type": "wokwi-neopixel-canvas",
|
||||
"top": 0,
|
||||
"left": 0,
|
||||
"attrs": {
|
||||
"rows": "32",
|
||||
"cols": "32",
|
||||
"matrixBrightness": "10"
|
||||
}
|
||||
}
|
||||
],
|
||||
"connections": [
|
||||
["esp:GND", "neopixels:VSS", "black"],
|
||||
["esp:D5", "neopixels:DIN", "green"],
|
||||
["esp:5V", "neopixels:VDD", "red"]
|
||||
],
|
||||
"dependencies": {}
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
4
wokwi.toml
Normal file
4
wokwi.toml
Normal file
@ -0,0 +1,4 @@
|
||||
[wokwi]
|
||||
version = 1
|
||||
firmware = '.pio/build/esp32/firmware.bin'
|
||||
elf = '.pio/build/esp32/firmware.elf'
|
Loading…
Reference in New Issue
Block a user