Simple programming question. I have a led strip consisting of 59 WS2812B pixles that

Simple programming question. I have a led strip consisting of 59 WS2812B pixles that I am running the standard Fire 2012 sketch on an Arduino nano. What I would like to do is to have the fire start in the center of the strip, and work it’s way towards each end. Technically, the 30th pixle would be center, and then 29 pixles each way. Trying to avoid cutting strip in half and soldering wires in the middle. There has to be some cleaver code that I could implement.

You could remap your LEDs with arrays.

So instead of 0123456789

You have 54321012345

This would be duplicated, but be centred,

Or you could try offsetting so 9876501234 but that might look glitchy.

Ill post an array ex in the morn

I already had a sketch that almost did this so created a new one here:

It has an option to go from center out or from ends inward.

Oh @David_Whalen ​, since your strip is an odd number of pixels you might need to modify things a bit subtracting 1 here or there.

Mark Miller, that worked out perfect. The center looks fine. I tried changing the total number of LEDs to 58 and made no difference, so I changed back to 59. It will look HOT in the top of my friends toolbox at work. Thank you so much. I love these controllers.

Actually, after the coffee kicked in, I noticed the last pixle not lighting because of the odd number of LEDs. I’m not sure how to properly alter the code, but I’m fine with that.

@David_Whalen You could add something that always copies the next to last pixel to the last pixel, so if leds 57 lights up it just gets duplicated to leds 58.
leds[58] = leds[57];

Or you could probably set NUM_LEDS to 60.

I changed the NUM_LEDS to 60 and that did the trick. My friend loves it, and it looks great. Thanks for the help.