Compare commits

..

No commits in common. "83dd19c68cd6be49bcfac615ad33ede665347c3c" and "de0505cf79db48bc023d939ec83276d8c19235d6" have entirely different histories.

2 changed files with 17 additions and 24 deletions

View File

@ -25,7 +25,7 @@ bool connected() {
void pause(uint32_t dwMs) { void pause(uint32_t dwMs) {
for (uint32_t t = 0; t < dwMs; t += 10) { for (uint32_t t = 0; t < dwMs; t += 10) {
wfm.process(); wfm.process();
digitalWrite(LED_BUILTIN, !connected()); digitalWrite(LED_BUILTIN, connected());
delay(10); delay(10);
} }
} }

View File

@ -40,17 +40,18 @@ void singleCursor(int count = 80) {
#define NUM_SPARKS 3 #define NUM_SPARKS 3
void sparkle(int cycles=50) { void sparkle(int cycles=50) {
int pos[NUM_SPARKS] = {0}; int pos[NUM_SPARKS] = {0};
for (int i = 0; i < cycles; i++) {
for (int i = 0; i < cycles; i++) { for (int j = 0; j < GRIDLEN/16; j++) {
for (int j = 0; j < NUM_SPARKS; j++) { pos[j] = random(GRIDLEN);
grid[pos[j]] = CRGB::Black; grid[pos[j]] = CRGB::Gray;
pos[j] = random(GRIDLEN); }
grid[pos[j]] = CRGB::Gray; FastLED.show();
} for (int j = 0; j < NUM_SPARKS; j++) {
FastLED.show(); grid[pos[j]] = CRGB::Black;
pause(40); }
} pause(40);
}
} }
#define NUM_GLITCH 4 #define NUM_GLITCH 4
@ -199,16 +200,6 @@ void netget(int count=30) {
} }
} }
const int spinner_pos[4] = {27, 28, 36, 35};
void spinner(int count=32) {
for (int i = 0; i < count; i++) {
int pos = spinner_pos[i % 4];
grid[pos] = CRGB::OliveDrab;
FastLED.show();
pause(125);
grid[pos] = CRGB::Black;
}
}
void loop() { void loop() {
Picker p; Picker p;
@ -226,9 +217,11 @@ void loop() {
glitchPulse(); glitchPulse();
} else if (p.Pick(8)) { } else if (p.Pick(8)) {
cm5(); cm5();
} else if (p.Pick(10)) {
spinner();
} else if (p.Pick(4) || !connected()) { } else if (p.Pick(4) || !connected()) {
netget(); netget();
} }
// trying to debug why we get freezing
grid[0] = CHSV(HUE_YELLOW, 255, 255);
FastLED.show();
} }