Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Issues:
- Flowstripe crashes when speed = 0 and when intensity = 0.
- 2D Drift, speed is reversed.
- 2D matrix could do with intensity.
- https://editor.soulmatelights.com/gallery
- https://wokwi.com/arduino/projects/___top_secret/library:FastLED
- https://wokwi.com/arduino/projects/___top_secret/part:wokwi-led-ring
- https://www.soulmatelights.com/blog/1-drawing-a-line
- sutaburosu ( https://wokwi.com/makers/sutaburosu )
- kriegsman ( https://gist.github.com/kriegsman )
- * https://gist.github.com/kriegsman/5adca44e14ad025e6d3b (swirl) Intensity is blur, speed is magnfiication. Make 2 animations, one without sound.
- ldirko ( https://wokwi.com/makers/ldirko )
- D* 2Ddna, update controls, intensity is blurring.
- D* 2DLissajous, speed controls phase, intensity controls blur.
- D*- https://editor.soulmatelights.com/gallery/819-colored-bursts (includes a drawline). Good. No sound.
- D* https://editor.soulmatelights.com/gallery/512-dna-spiral-variation (a variation. Could even add noise). Good. No sound.
- D* https://editor.soulmatelights.com/gallery/392-flow-led-stripe (1D effect) Speed, intensity.
- D* https://editor.soulmatelights.com/gallery/810 (rgb hiphotic) OK. Good. Speed, intensity.
- x https://editor.soulmatelights.com/gallery/880-pattern-trick Meh, but short. Just speed.
- D* https://editor.soulmatelights.com/gallery/878-pulse-test Good. Speed only.
- Dx https://editor.soulmatelights.com/gallery/430-rainbow-flicker (1D effect) A short fade-in/out with no controls.
- D* https://editor.soulmatelights.com/gallery/597-sin-dots OK. Speed, intensity.
- D() https://editor.soulmatelights.com/gallery/599-sun-radiation Too big for a Nano, and lots of subroutines.
- D*- https://editor.soulmatelights.com/gallery/921-twister-test OK. Speed, intensity.
- Stepko ( https://wokwi.com/makers/stepko )
- D* https://editor.soulmatelights.com/gallery/640-color-frizzles Short and good. Speed, intensity.
- D*- https://editor.soulmatelights.com/gallery/884-drift Great. Speed, intensity
- D* https://editor.soulmatelights.com/gallery/659-plasm-ball Great. Speed
- D* https://editor.soulmatelights.com/gallery/517-poolnoise OK
- D** https://editor.soulmatelights.com/gallery/737-swirl OK. Speed, intensity and sound.
- x? https://editor.soulmatelights.com/gallery/671-tixyland (tixyland - multiple effects). No controls.
- D** https://editor.soulmatelights.com/gallery/652-wave OK. Use with and without sound. Speed controls and instensity. Try Avg. Looks great.
- Elliott Kember
- D* https://editor.soulmatelights.com/gallery/3-tartan Good. Speed, intensity.
- Konstantyn
- D* https://editor.soulmatelights.com/gallery/762-polar-lights Good, speed, intensity, palette with fft1.
- In order to convert:
- - Use a starting template with an XY() routine.
- - Import code.
- - Change ROWS/COLS variables to matrixHeight/matrixWidth.
- - Test 4x64, 16x16.
- - Review/convert/fix variable types.
- - Ensure it doesn't overflow SEGLEN-1. Some routines do, and that needs to be fixed.
- - Go through it all again. . . and cull any redundant routines.
- Initial import complete.
- - Review drawline functions for consistency. Don't want 10 of them.
- - Add palette support.
- - Consider controls.
- - Add to WLED (FX.cpp, FX.h)
- - Change variables to support WLED ones.
- - Ensure it supports segments, i.e. no use of EVERY_N_MILLIS().
- - Possibly use NeoPixelBus LED assignment.
- - Review/add controls.
- - Document it all.
- Common routines
- drawPixelXYF (stepko|drift)
- mydrawLine (ldirko|coloredbursts) (ldirko|twister)
- CRGBPalette16 currentPalette = PartyColors_p;
- leds[XY(x, y)] = ColorFromPalette(currentPalette, index, bright, LINEARBLEND);
- #include <FastLED.h>
- #define LED_PIN 12
- #define matrixWidth 16
- #define matrixHeight 16
- #define SEGLEN (matrixWidth*matrixHeight)
- #define matrixSerpentineLayout true
- CRGB leds[SEGLEN];
- CRGBPalette16 currentPalette = PartyColors_p;
- void setup() {
- delay(1000);
- Serial.begin(115200);
- FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, SEGLEN);
- FastLED.setBrightness(64);
- } // setup()
- WLED variables
- SEGLEN, SEGMENT.intensity, SEGMENT.speed, SEGMENT.fft1, SEGMENT.fft2, SEGMENT.fft3
- FFT_MajorPeak, FFT_Magnitude, fftResult[]
- sample, samplePeak, sampleAgc, sampleAvg -> tempsamp
- SEGENV.aux0, SEGENV.aux1 (uint16_t), call
- Easiest routines to port
- Don't use multiple subroutines.
- Minimize static variables (up to 2 uint16_t).
- Absolutely no delay statements.
- setPixelColor(pixloc, color_blend(SEGCOLOR(1), color_from_palette(pixloc%255, false, PALETTE_SOLID_WRAP, 0), 255));
- setPixelColor(__location, color_blend(SEGCOLOR(1), color_from_palette(__index, false, PALETTE_SOLID_WRAP, 0), __brightness));
- setPixelColor(i, color);
- CRGB newcolor = CHSV( hue8, sat8, bri8);
- fastled_col = col_to_crgb(getPixelColor(i));
- nblend(fastled_col, newcolor, 64);
- setPixelColor(i, fastled_col.red, fastled_col.green, fastled_col.blue);
- setPixelColor( i, getPixelColor( i - 1));
- uint32_t ctemp = getPixelColor(0);
- setPixelColor(SEGLEN -1, ctemp);
- We've been busy with our sound reactive fork of WLED lately, with a number of 2D animations being added to our ESP32 based 'dev' branch.
- These animations are thanks to the folks on wokwi.com and soulmatelights.com with their very cool FastLED emulator. Most of the animations are from ldirko and Stepko, who've done some amazing work and with very short code at that. We managed to port many of their animations over to WLED and have added speed/intensity controls to most of them. Our Wiki will be updated with more information on the new animations.
- As a result, our ESP32 based sound reactive fork of WLED now has 172 1D, 2D, volume and frequency reactive animations. We'll continue to test these new animations over the coming month for any outstanding issues.
- Andrew has also ordered a 241 LED in a ring form factor and hopes to implement future WLED animations based on these.
- "2D CA Elementary",
- "2D Colored Bursts",
- "2D DNASpiral",
- "2D Drift",
- "2D Frizzles",
- "2D Hiphotic",
- "2D Lissajous",
- "2D Plasma Ball",
- "2D Polar Lights",
- "2D Poolnoise",
- "2D Pulser",
- "2D Sindots",
- "2D Sun radiation"
- "2D Tartan",
- "2D Twister",
- "Flow Stripe",
- "* 2D Waverly",
- "* 2D Swirl",
- "** Blurz",
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement