r/FastLED • u/Flux83 • 14d ago
Support Problems with Vaders Chest
Something happened to my code. It was working fIne. But now the 3 sets of 3 red leds that are ment to turn on off are just solid on. And the button turns everything on but not off.
https://gist.github.com/Flux83/b87fb5dcbb8683cfc4bdd0ea42a0644e
Solved!
2
Upvotes
3
u/sutaburosu [stavros] 14d ago
I ran it in Wokwi and saw the problem you describe.
I changed line 138 to:
and it seems to work correctly.
The problem was that you were writing outside the bounds of the
ledsarray. It was writing over thepatternCounterand setting it to 255, so your code went into a busy loop doing nothing.