Here’s a visualization that uses FastLED’s sin16() math, and provides some sine wave interference patterns. By adding potentiometers, I could change frequencies, hues, etc. In the meantime, it’ll go into my effects arsenal.
Oh, and I’ve put the WS2812B strip inside some tubing to clean out pools. It’s awesome.
#include “FastLED.h”
#define LED_DT 13
#define LED_COUNT 24
CRGB leds[LED_COUNT];
int wave1=0;
int wave2=0;
int wave3=0;
void setup() {
LEDS.addLeds<WS2811, LED_DT, GRB>(leds, LED_COUNT);
}
void loop() {
wave1+=835; // Waves of different frequencies
wave2-=693;
wave3+=493;
for (int k=0; k<LED_COUNT; k++) {
// leds[k].r = (sin16(wave1+k1024)/256+128); // Individual waves are map output from -32767 - 32767 to 0 - 255
// leds[k].g = (sin16(wave2+k1024)/256+128);
// leds[k].b = (sin16(wave3+k*1024)/256+128);
// leds[k].b = ((sin16(wave1+kwave1)/256+128) + (sin16(wave2+k894)/256+128))/4; //Two combined waves (added)
leds[k].b = ((sin16(wave1+kwave1)/256+128) + (sin16(wave2+kwave2)/256+128)+ (sin16(wave3+k*wave3)/256+128))/4; //Three combined waves (added)
}
LEDS.show();
delay(60);
}