diff --git a/diagram.json b/diagram.json index ee15084..912a374 100644 --- a/diagram.json +++ b/diagram.json @@ -24,16 +24,13 @@ } ], "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 + "newline": "lf" }, "dependencies": {} } \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 3280022..29feded 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -23,6 +23,7 @@ #include "CLEDControllerPhysicalStrip.h" #include "CLEDControllerPhysicalMatrix.h" #include "SmartMatrixPhysicalMatrix.h" +#include "elapsedMillis.h" #define NUMLEDS 1024 @@ -52,12 +53,14 @@ LEDHAL2D* hal2D; MatrixAnimation* animation; +elapsedMillis printTimer; + int animationCode = 0; void setup() { - Serial.begin(115200); + Serial.begin(9600); - while(!Serial) {} + delay(5000); Serial.println(F("STARTUP!")); @@ -68,7 +71,7 @@ void setup() { if(animationCode == 0) { animation = new PlasmaMatrix(hal2D, "Plasma Matrix", 10); - } else if(animationCode == 1) { + } /*else if(animationCode == 1) { animation = new AlternateMatrix(hal2D, "Alternate Matrix", 125, rainbow, 6, AlternateType::HORIZONTAL_ALTERNATE); } else if(animationCode == 2) { animation = new CollisionMatrix(hal2D, "Collision Matrix", 125, CRGB(255, 45, 0), CRGB::Green, CollisionType::HORIZONTAL_COLLISION); @@ -90,7 +93,7 @@ void setup() { } else if(animationCode == 8) { //It works, kinda? It doesn't look like the original version of the animation animation = new CycloneMatrix(hal2D, "Cyclone Matrix", 100, 16, 16, 4, 16, 6, rainbow); - } + }*/ animation->enable(); } @@ -99,4 +102,9 @@ void loop() { animation->update(); hal2D->show(); + + if(printTimer >= 5000) { + Serial.println("PRINT!"); + printTimer = 0; + } }