RGB Strip Matrix Help

Hello, i’m still a noob when it comes to programming. I can do a lot of the examples for RGB strips (who can’t right? lol) I have a few patterns I want to run on my Deadmau5 head i’m building but my layout is not typical as it has an uneven amount of LED’s across it.

Have a look at the attached picture, my strips are wired up and down in a zig zag pattern starting from the right side if you’re looking at the picture, left side if you’re wearing it. There are more below the mouth opening that will be connected to the strips directly above it.

All the patterns I want to use are set up for the strips being placed side to side and not up and down. How would I go about changing the code to basically flip the pattern 90 degrees?

Your main problem is that:-

as it has an uneven amount of LED's across it.

That rules out any simple way of rotating your pattern. You are better off designing it for the hardware you have instead of trying to adapt an existing one.

Poop, ok. I really didn’t want to have to do that since i don’t have too much experience writing code. I thought there were parameters I could change inside an existing code that I got from another project to make it work for mine.

None of my strips are wired yet or really in a set spot. Would there be a better way to lay them out? Keep in mind they will always be uneven. unless i can split the number of LED's between the top and under the mouth to make a curved matrix that is essentially square...hmmm now i'm thinking.

You don't have to write any code, all you need to do is to write the data for each LED in each pattern in the order that you have wired it up.

Might you post an example? One of the patterns I want is in the attached spreadsheet. I want to light just the pixels in red with the color blue. I also want to add the following code and have it cycle through them all including the pattern I want above.

#include "AlaLedRgb.h"

AlaLedRgb rgbStrip;

AlaSeq seq[] =
  { ALA_OFF,            1000, 2000, alaPalNull },
  { ALA_ON,             1000, 2000, alaPalRgb },
  { ALA_SPARKLE,        1000, 9000, alaPalRgb },
  { ALA_CYCLECOLORS,    3000, 6000, alaPalRgb },
  { ALA_OFF,            1000, 1000, alaPalNull },
  { ALA_FADECOLORSLOOP, 3000, 6000, alaPalRgb },
  { ALA_SPARKLE2,       1000, 6000, alaPalRgb },
  { ALA_OFF,            1000, 1000, alaPalNull },
  { ALA_SPARKLE2,       1000, 6000, alaPalFire },
  { ALA_PIXELSMOOTHSHIFTRIGHT, 6000, 2000, alaPalRgb },
  { ALA_OFF,            1000, 1000, alaPalNull },
  { ALA_MOVINGBARS,     3000, 6000, alaPalRgb },
  { ALA_COMET,          3000, 6000, alaPalRgb },
  { ALA_COMETCOL,       3000, 6000, alaPalRgb },
  { ALA_OFF,            1000, 1000, alaPalNull },
  { ALA_GLOW,           3000, 6000, alaPalRgb },
  { ALA_OFF,            1000, 1000, alaPalNull },
  { ALA_FIRE,           1000, 6000, alaPalFire },
  { ALA_OFF,            1000, 1000, alaPalNull },
  { ALA_BOUNCINGBALLS,  1000, 6000, alaPalRgb },
  { ALA_OFF,            1000, 1000, alaPalNull },
  { ALA_BUBBLES,        1000, 6000, alaPalRainbow },

void setup()
  rgbStrip.initWS2812(60, 6);


void loop()

Any help is appreciated...I'm not a complete idiot when it comet to programming just not an expert yet.

Might you post an example?

Only if you can describe the difference between posting an example and doing it for you.

Please read this:-
How to use this forum
Because your post is breaking the rules about posting code.

Also what on earth is AlaLedRgb.h, the rules above always advise you to post a link to non standard obscure libraries.

my strips are wired up and down in a zig zag pattern starting from the right side

That diagram says they are not. A zig zag pattern is known as a serpentine raster and would have LED 15 next to LED 14 with them acceding in order in the second column from the right.

I apologize, This is my first time using this board.

You're right I did label my spreadsheet wrong. I corrected it.

I also fixed the code. It looks like the AlaLedRgb.h is just a renamed library for a neo-pixel library. Kind of a library inside another library.

I'm not asking anyone to write me a complete code...just a hint on how to assign a specific LED in my string when it comes to sequence i want to run.

You have two choices.

  1. Write a list of all the numbers of all the LED that are on along with the colour you want them. Put these numbers in an array and have the code transfer these numbers into the buffer having first wiped out ( turned off ) all the LEDs with a simple loop. This takes a lot of memory per frame, and you might want to put this array into program memory.

  2. Write down the LEDs and colour that CHANGE between the last frame and the current frame. Normally this will be a much shorter list. Then write the code that does those changes.

For example say LEDs 4,9 and 16 are on with the colours red, green and blue then for both methods you would have the numbers
4,255,0,0, 9,0,255,0 16,0,0,255
in your array. The first is the LED number the following three are the colour brightness for each LED colour.

suppose the second frame required just LED 9 to turn off then :-
the numbers for method 1 would be
4,255,0,0, 16,0,0,255
where as the numbers for method 2 would be:-