Push up existing wokwi changes
This commit is contained in:
16
diagram.json
16
diagram.json
@@ -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": {}
|
||||
}
|
||||
@@ -38,6 +38,8 @@ class ColorRandomizerMatrix : public MatrixAnimation {
|
||||
} else {
|
||||
fadingValues = new CRGB[matrix->getWidth()];
|
||||
}
|
||||
|
||||
Serial.println("Initialize is ok");
|
||||
}
|
||||
|
||||
void execute();
|
||||
|
||||
10
src/main.cpp
10
src/main.cpp
@@ -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) {
|
||||
|
||||
@@ -2,3 +2,4 @@
|
||||
version = 1
|
||||
firmware = '.pio/build/esp32/firmware.bin'
|
||||
elf = '.pio/build/esp32/firmware.elf'
|
||||
gdbServerPort=3333
|
||||
Reference in New Issue
Block a user