Misc-small-projects/School/vg2/borg/demos/chaos.ino
Daniel Løvbrøtte Olsen adb0f0c372 Rename chaos to chaos.ino
2017-04-03 13:28:12 +02:00

22 lines
321 B
C++

#include <FastLED.h>
#include <borg.h>
#define NUM_LEDS 54
#define DATA_PIN 7
CRGB leds[NUM_LEDS];
void setup()
{
FastLED.addLeds<PL9823, DATA_PIN>(leds, NUM_LEDS);
randomSeed(analogRead(0));
}
void loop()
{
int select = random(0, NUM_LEDS);
leds[select] = (CRGB) random(1, 0x1000000);
FastLED.show();
}