/*
Fireball Spirals by ldirko
*/
#include "FastLED.h"
// LEDs pin
#define DATA_PIN 3
// LED brightness
#define BRIGHTNESS 255
#define NUM_STRIPS 15
#define NUM_LEDS NUM_STRIPS * 64
CRGBArray<NUM_LEDS>leds;
void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
FastLED.setBrightness(BRIGHTNESS);
}
void loop() {
uint16_t a = millis();
for (int i = 0; i < NUM_STRIPS; i++) {
for (int j = 0; j < 64; j++) {
leds[XY(NUM_STRIPS - 1 - i, 63 - j)] = ColorFromPalette(HeatColors_p, qsub8(inoise8(i * 60, j * 60 + a * 2, a / 3), abs8(j - 63) * 255 / 63), BRIGHTNESS);
}
}
LEDS.show();
}
uint16_t XY (int x, int y) {
return (x * 64 + y);
}