Skip to content

Instantly share code, notes, and snippets.

@Draradech
Created May 13, 2018 09:30
Show Gist options
  • Save Draradech/8c22089741c55cc911141375d4b18ee4 to your computer and use it in GitHub Desktop.
Save Draradech/8c22089741c55cc911141375d4b18ee4 to your computer and use it in GitHub Desktop.
#include "FastLED.h"
CRGB leds[600];
void setup()
{
FastLED.addLeds<WS2812B, 10, GRB>(leds, 600);
FastLED.setBrightness(255);
}
int hue = 0;
int huesteps = 0;
void loop()
{
int l = random16(600);
leds[l] = CHSV(hue, 128 + random8(128), 255);
l = random16(600);
leds[l] = CRGB::Black;
l = random16(600);
leds[l] = CRGB::Black;
huesteps++;
if(huesteps == 100)
{
huesteps = 0;
hue = (hue + 1) % 256;
}
FastLED.show();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment