Skip to content

Instantly share code, notes, and snippets.

@carnal0wnage
Last active August 25, 2018 21:57
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 carnal0wnage/f7bf4fb559b8e23f159ce42b67dbf3ba to your computer and use it in GitHub Desktop.
Save carnal0wnage/f7bf4fb559b8e23f159ce42b67dbf3ba to your computer and use it in GitHub Desktop.
WS2811 FastLED basic does this shit work sketch
#include "FastLED.h"
#define NUM_LEDS 50
CRGB leds[NUM_LEDS];
static byte initialHue = 0;
byte changeInHue = 255 / NUM_LEDS;
void setup() { FastLED.addLeds<WS2811, 6>(leds, NUM_LEDS); }
void loop() {
//leds[0] = CRGB::Green; FastLED.show(); delay(300);
leds[0] = CRGB::Blue; FastLED.show(); delay(300);
leds[0] = CRGB::Black; FastLED.show(); delay(300);
leds[30] = CRGB::Red; FastLED.show(); delay(300);
leds[30] = CRGB::Black; FastLED.show(); delay(300);
leds[49] = CRGB::Green; FastLED.show(); delay(300);
leds[49] = CRGB::Black; FastLED.show(); delay(300);
//fill_solid( leds, NUM_LEDS, CRGB::Red);
//fill_rainbow( leds, NUM_LEDS, initialHue, changeInHue);
//FastLED.show();
//delay(1000);
//FastLED.clear();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment