Skip to content

Instantly share code, notes, and snippets.

@karltinsly
karltinsly / FastLED_rotation
Created July 10, 2018 01:39
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);
}
}
//***************************************************************
// This is Mark Kriegsman's FastLED DemoReel100 example with
// a modificaiton to use a button for changing patterns. The
// timer used for picking a new pattern has been commented out
// and there is a button check inside the main loop now.
//
// Search for "BUTTON STUFF" to find the various button releated
// code additions.
//
// Marc Miller, March 2017
@karltinsly
karltinsly / PoleLEDTest
Created September 14, 2017 20:30
LED Pole buttons register presses, but lights will not loop
//Modified version of Jesus Climent's pole-320leds-aluminum code
#include <FastLED.h>
#include <EEPROM.h>
#include <Wire.h>
// How many leds in your strip?
#define NUM_LEDS 300
const int8_t ledblock = 5;