Been racking my brains and so far just got balder.

Been racking my brains and so far just got balder. I would like to “move” a small group of leds across a strip of 144 pixels, in order to use it as a clock. I would like really smooth blending using a palette with a white pixel as the second blending off to red or something, but for the life of me have not figured out how to do this. Having spend hours fiddling with all this, does anyone have any pointers for me?

Any examples of what you have you tried so far?

One of my first thoughts was something like Mark’s anti-aliased light bar example:

I did a version of that for a rotating light house beacon:

It doesn’t use a palette, but the trailing pixels should be able to be color shifted from the center color to another color.

Can you clarify how you’re wanting to use the palette? Is it for the moving group, or for coloring all the other pixels besides the moving group?

@Jason_Coon made a clock

Great stuff, @Marc_Miller1 and @Tommy_Sciano , certainly plenty of food for thought. Thanks for that.

This is the effect I’m after, is there a simple way to smoothly move these colours across the strip, at some given speed?
missing/deleted image from Google+

The method used might be determined by requirements of the display. Does it need to vary in speed? (Maybe not if it’s for a clock. :wink: Would the length need to change? Constant or variable color(s)? etc.

Think of it as layer up the final image. You could fill the whole strip with the background color (blue) and then draw (add) the moving animation part on top, as well as your minute and hour markers.

The moving animation part could come from a “fixed” set of data (that’s only 12 pixels long for example) with it’s position simply shifted along the strip. Here’s an example of the concept.

It could also all be calculated in real time (like the lighthouse beacon example). Maybe it would be two or three (separate colors and different length) bars that are then added together, and on top of the blue background. See this wiki page for ideas on add/combining colors from two sources. It could leds[i] + some color, or leds[i] + leds_temp[i] (with leds_temp[] being a separate CRGB array, either constant or being calculated on the fly).

[edit: forgot the wiki link]

@marmil thanks for that example link. The issue with that and all the other things I have tried is that they don;t move the strip smoothly, they jump from one whole LED to another. What I was hoping for was a simple function or two that would smoothly blend a gradient slowly into the next LED.

I have something working already, but it’s overly complicated, and I’m trying to reduce it to something simpler and more manageable. I will try to post the code sometime today.

What did you think of Mark’s anti-aliased bar sort of setup?

Also, a good diffusion can help smooth things out. But then if wanted a tight/small hour or minute marker on your clock it wouldn’t be as sharp any more.