Here's a visualization that uses FastLED's sin16() math,

(Andrew Tuline) #1

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
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

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+k
// 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)

(Marc Miller) #2

That looks great Andrew. Sweet!

(Andrew Tuline) #3

I’ve found some articles on plasma demos, and I’ll continue to play around with that. I suspect I’ll use quadwave8() and possibly the CRGBPalette16 for some interesting visualizations.

(Joe Banko) #4

I’ve “borrowed” a lot of code, (a great deal from Andrew) and a lot of other places and have built a device which has 60 preset effects, chases, fire, bouncer, ripples and matrix. I also have been figuring out my own palettes and effects. BUT to make it all easier I have 10 potentiometers for parameters, another pot for function selection and 9 switches for selecting and recording 60 presets and the ability to have an A and B scene so I can rapidly go from one scene to another. Once I get the silly 7 segment display to latch the current A and B addresses I will put up some videos and ALL the code. And schematics sometime in the future. Andrew, thanks for all the creative sparks you’ve generated!!

(Andrew Tuline) #5

Glad I could help. Funny enough, I’d misplaced this visualization and spent an hour yesterday looking for it. Glad you found it, so I can update it with palette lookups and non-blocking delays.