Skip to content

Instantly share code, notes, and snippets.

@karltinsly
Created July 10, 2018 01:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karltinsly/811fb536072787ddf01375ade631b991 to your computer and use it in GitHub Desktop.
Save karltinsly/811fb536072787ddf01375ade631b991 to your computer and use it in GitHub Desktop.
Need help to light 8 pixels at a time
void rotation() {
animDelay = mappedSpeed;
if (millis()-LastAnim >= animDelay) {
rot = rot + 1;
if (rot > NUM_LEDS - 1){rot = 0;}
fadeToBlackBy( leds, NUM_LEDS, 20);
LastAnim = millis();
leds[rot] += CHSV(gHue, 255, outputBright);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment