Push up existing wokwi changes

This commit is contained in:
2025-12-20 12:54:56 -05:00
parent 1ed3c99141
commit ef3eded08d
4 changed files with 27 additions and 4 deletions

View File

@@ -3,7 +3,14 @@
"author": "Uri Shaked",
"editor": "wokwi",
"parts": [
{ "type": "board-xiao-esp32-s3", "id": "esp", "top": 1000, "left": 13.78, "attrs": {} },
{
"type": "board-xiao-esp32-s3",
"id": "esp",
"top": 1000,
"left": 13.78,
"attrs": {
}
},
{
"id": "neopixels",
"type": "wokwi-neopixel-canvas",
@@ -17,9 +24,16 @@
}
],
"connections": [
["esp32:TX0", "$serialMonitor:RX", "", []],
["esp32:RX0", "$serialMonitor:TX", "", []],
["esp:GND", "neopixels:VSS", "black"],
["esp:D5", "neopixels:DIN", "green"],
["esp:5V", "neopixels:VDD", "red"]
],
"serialMonitor": {
"display": "always",
"newline": "lf",
"convertEol": false
},
"dependencies": {}
}

View File

@@ -38,6 +38,8 @@ class ColorRandomizerMatrix : public MatrixAnimation {
} else {
fadingValues = new CRGB[matrix->getWidth()];
}
Serial.println("Initialize is ok");
}
void execute();

View File

@@ -52,9 +52,15 @@ LEDHAL2D* hal2D;
MatrixAnimation* animation;
int animationCode = 8;
int animationCode = 0;
void setup() {
Serial.begin(115200);
while(!Serial) {}
Serial.println(F("STARTUP!"));
CLEDController* controller = &FastLED.addLeds<NEOPIXEL, 6>(leds, NUMLEDS);
controller->setCorrection(TypicalLEDStrip);
@@ -69,7 +75,7 @@ void setup() {
} else if(animationCode == 3) {
//Doesn't work, causing heap corruption
animation = new ColorRandomizerMatrix(hal2D, "Color Randomizer Matrix",
40, true, 6, rainbow, ColorRandomizerType::HORIZONTAL_COLORRANDOMIZER);
200, false, 6, rainbow, ColorRandomizerType::HORIZONTAL_COLORRANDOMIZER);
} else if(animationCode == 4) {
animation = new CycleLightMatrix(hal2D, "Cycle Light Matrix", 100, rainbow, 6, CycleLightType::HORIZONTAL_CYCLELIGHT);
} else if(animationCode == 5) {

View File

@@ -1,4 +1,5 @@
[wokwi]
version = 1
firmware = '.pio/build/esp32/firmware.bin'
elf = '.pio/build/esp32/firmware.elf'
elf = '.pio/build/esp32/firmware.elf'
gdbServerPort=3333