Just found this group and been reading lots.

Just found this group and been reading lots. I’ve been making some led goggles using a atmega328 and some led rings and very jealous of some of the crazy mapping some projects on here are using. Hoping to upgrade to a esp8266 soon ish if I can figure how out to make it fit.

How do you guys create more complex imaged and patterns? All mine are hard coded functions to spin or chase leds but wanting to step up and do more things with gradients and fade effects

Whoua that is really nice !!!

You have some great patterns there!

Are you doing anything with polar coordinates? That would be one of the best ways to generate interesting effects in more than one dimension with rings.

Some ideas:

  • Color gradients that undulate from the center outwards, while simultaneously varying the brightness with the angle (either same brightness:angle for the rings together, or offsetting the angle for each ring).

  • Different colors for each wedge of the disc, split into eighths (or whatever), rotating.

  • Remap a 2D Fire pattern from (x,y) to (r,theta) polar coordinates. Same with Fireworks.

  • Attach an IMU, and use it to simulate water trying to stay level as the goggles tilt this way and that.

  • Center pixels slowly start to get brighter (in some single color), then when it reaches some threshold, it “explodes” outward.

@dougal thanks for these! I’ll look into adding some of them as they sound like a lot of fun.

For most of the patterns I wrote a tracer function that you specific a starting led, how many to turn on, how many in the ring, and a time period and it iterates around in circles so it’s sort of similar to polar coordinates I guess. Every pattern is a few calls to the tracer function with different inputs

Previously I tried storing a bunch of patterns in arrays and rotating them and mapping colors onto them but the little 328 at 8mhz couldn’t go fast enough at times but seeing some of the designs in here maybe I just coded it really poorly

Very cool patterns

@Nolan_Liss - Amazing animation and very creative use of rings!

If you want to learn more about gradients and fading, I would recommend that you look at the following FastLed examples that come with the library: Demo100 and Color Palette. Also, you can see where I use gradients, color changes and fading in my Saw Tooth and Sine Wave post:

https://plus.google.com/102004717133653297761/posts/dfJMis1aD6M

If you are interested in polar coordinates mapping as per @dougal 's great suggestion, then you should look at @Jason_Coon ’s awesome Tree V2 project:

https://plus.google.com/+JasonCoon1/posts/QzGu3HTQgXr

And how I applied his polar coordinates mapping to a matrix:

https://plus.google.com/102004717133653297761/posts/1XeG3sKGu9z

You should be able to do the same for your concentric rings.

FYI, all projects above include links to their codes in GitHub.

https://plus.google.com/102004717133653297761/posts/1XeG3sKGu9z

@Ken_White Thanks! Really appreciate this info and all the links I’m gonna start reading.

What I’ve been struggling with is how to integrate these gradients into my code structure. At he moment I have a function that generates a segment of a pattern, lets say 4 leds on spinning clockwise. And I set the animation period and a color code. In the function it uses the color code and does a lookup of what color to assign that led.

I dont really want to go back to mapping a gradient across all the leds and then after only turning some on as I’m only running on a 8mhz atmega328 so trying to keep things as lean as possible. Maybe I need to do a reverse lookup where once I find a LED thats on I need to find what color it should be in the gradient calculation?

@Arcane_Lights - Go to the following sketch at:

In line 194, look at the cd77_matrix_sinewave_beatsin function. See how I use the FastLED beatsin16 function to change colors of LEDs.

In line 215, look at cd77_matrix_sinewave_palette. See how I use the FastLED ColorfromPalette function to change colors of LEDs in which the colors are from a palette that you assign to this function.

These effects are seen in the following YouTube video which was run on an Adafruit Metro Mini (same as a Nano) MCU:

This might help you to do what you just described that you want to do.

Super cool, would love to see your code

Ahh those are the REZZ glasses someone 3d printed. @Nolan_Liss you didn’t make those glasses did you?

also

https://myhub.autodesk360.com/ue2963b24/g/shares/SH7f1edQT22b515c761ee803a70e99f9fad0?viewState=NoIgbgDAdAjCA0IDeAdEAXAngBwKZoC40ARXAZwEsBzAOzXjQEMyzd1C0BjAFgGZGAnACMAJiIC0AJk68I47gDZeAVnEAOEbgFTG3SY15rluIZO5oAviAC6QA

https://www.behance.net/gallery/43220151/REZZ-Glasses-mk2

Could add accelerations to the movement, reversing direction.