64 pxl matrix help

I posted earlier about the blaster install I am working on. I finished it up today, and the 64 pxl matrix isn’t working at all.

I have it wired up to data 2 and led- 4. here is the blade config:

BladeConfig blades[] = {
{ 0, 
	SubBlade(9, 9, WS281XBladePtr<10, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >()), /* muzzle */
	SubBlade(0, 8, NULL), /* barrel */
	WS281XBladePtr<64, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin4> >(), /* accents */
CONFIGARRAY(presets) },
};

and here is an example style: (came with the fonts, not sure what it was written for)

// accents
  StylePtr<Layers<
    Black,
    TransitionEffectL<TrConcat<TrDelay<0>,White,TrFade<200>,Rgb<180,120,0>,TrFade<300>>,EFFECT_FIRE>,
    TransitionEffectL<TrConcat<TrDelay<0>,DeepSkyBlue,TrFade<200>,Blinking<Black,Blue,100,500>,TrFade<300>>,EFFECT_STUN>,
    LockupTrL<Layers<
      TransitionLoopL<TrConcat<TrInstant,White,TrFade<50>,Red,TrFade<150>>>>,TrInstant,TrConcat<TrInstant,Rgb<50,0,0>,TrFade<400>>,SaberBase::LOCKUP_AUTOFIRE>>>(),
},

Anything look wrong? or does a matrix work differently?

Ah, perhaps it is this?
WS281XBladePtr<64, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin4> >(),
bladepin4

Because I have it on data 2, it should be blade2Pin ?

edit: Yes! That was it! It now works.

so - Next question is how to get started making animations for it? Not detailed animations like a person running or anything, but more like a vu meter bouncing, a single moving pixel, breathing, etc. while idle?

Depends, were you thinking of ways to draw stuff or ways to code stuff?
Or ways to use the style code for grids?

One option would be to break it up into 8 subblades and then assign similar, but not identical 2d styles to each one, which might look kind of cool, but it’s also a bit limiting because it means you won’t have the option to do things any other way.

Thats a good question. I am a simple man, perhaps just style code to do cool things?

One issue I have is what is pixel 1? Here is the matrix, it is 4x16:


I connected my data to the upper Din. But there is a lower Din as well, huh? Bi-directional?

Is there a way to figure out what my 1st pixel is? If its in the middle, can a style be defined that isn’t starting in a strange spot.

Alternately - I know you mentioned here (and before in my other thread) about programming for the matrix to make it act like a display. How would this be done? I am not too much of a programmer, but I have muddled thru so far to get the results I want.

Hopefully there is some sort of documentation which specifies the order of the pixels.
I would assume that you can use either one of the DIN and DOUT pins, but again, documentation…

4x16 should be easier to deal with, as you onlly need four subblades. I know from my quad-blade that you can do some cool things with fire and stripes that way. (See my K4 config file for examples.)

One alternate way to figure out in which order the pixels are configured would be to use the length finder. It lights up one LED at a time and speaks the number, and you can use the variance variable, using color change on the serial monitor to change which led is actually lit up.

Making it work like an actual display will require a fair bit of coding. I have a bunch of code that can be re-used, but that code currently assumes SPI output, and it would need some new stuff to allow neopixel matrices to be used. Not super hard, but probably easier if I do it… and then you still have to create animations for it, which takes some work too.

A simpler option when it comes to coding is probably to just code your own style template. Basically you need a run() functoin (which gets called once per frame) and a getColor() function (which gets called once per pixel) then you just have to write some code that returns whatever colors you want.

Unfortunately, no. No documentation that I can find. It seems like it may have been geared toward CFx, here is what shtok wrote in various places on facebook, etc.

Continuing to develop new styles of the classic 10-bargraph display, with introducing a first ever RGB pixel 10-segments bargraph in aluminum casing back in 2019, and now a first ever with highest resolution RGB pixel matrix bargraph display, which fits in same 20-pin DIP socket and can be positioned reversed without fear of reverse polarity and frying the pixels. Can be easily controlled by Plecter Labs CFX Grafx feature for crazy animations and still can work as a regular pixel strip array with other sound boards like Proffieboard, Verso, Golden Harvest etc. to add amazing animation patterns to your neopixel saber.

That sounds great, I wouldn’t mind if you coded it. :wink:
If you want to sink time into it, and I love making animations and the like!

that sounds quite hard, actually, lol.

I will start with trying to figure out which is pixel one…

For some magical reason, pixel 1 is the top left. So, hooray!

Without motion, I could not tell what pixel 2 and on are.

Pixel 1 is marked by this small symbol in one of the corners, the other follow horizontally then down to the next row, then horizontally to the left, then down again and so forth:

matrix first pixel

3 Likes

Thank you! Mine happened to be the upper left once installed. Hopefully that helps in making animations.

1 Like

So I did.
I have not tested it yet, but some basic instructions can be found here:

Now, after that you need to figure out how to operate a color display, which is brand new and not a well trodden path yet. Generating animations is going to be a matter of making a bunch of PNG files or mp4 files, and the converting them to PQF. Proper documentation does not exist yet, but I think what you would need should hopefully be written down somewhere in this thread:

If not, I can help with that.

This piece of code can of course also be used for regular blades, I mean, it’s just a 1x144 display, right?

Wait. So if I read this ight, we can make a 1x144 mp4, convert to PQF, and it “plays” on a blade if so desired?
I have pseudo-rhetorical questions, as in no answer is expected right now, but hopefully someday there’s documentation explaining them:

What’s the syntax for a “display style” in the preset, just DisplayStyle<DISPLAYNAME>, and then it shows the PQF?
Does it loop?

Yes.

DisplayStyle<> is a style template that returns COLOR, so it can be used anywhere in the style, but is probably most useful if used as the base layer.
There are also some parameters for rotation, mirroring and zig-zag layouts.

PQF has GOTO in it. If you want it to loop, you put a goto at the end to the beginning. The mp4 → PQF conversion tool does that by default if you give it a single file, but you can also give it a file like this:

The display code also renders layers, so you probably want a looping base PQF, then you can play non-looping effects on top of it for clashes and stuff.

PQF and color displays isn’t quite as crazy as the style code, but it’s not exactly simple either…

Amazing!

I read through that thread again, so I think I am on my way.

While I download unbuntu, I started on the config.

I have this just before CONFIG_PRESETS

#ifdef CONFIG_STYLES
	InMemoryDisplay<4, 16, 3> my_small_display;
	StandarColorDisplayController<4, 16> my_small_display_controller(&my_small_display);
	NAME_INSTANCE(my_small_display, MYDISPLAY);
	
#endif

Where InMemoryDisplay<4, 16, 3> 4 is the height and 16 is the length? Maybe I have that reversed. What is the “3”? I think I saw somewhere you said its the layers?

Either way - with a fresh proffieos, my test config compiled with no errors.

I will start off with a simple image animation. One question. where do I put the pqf files once I have them? Does my config need to have a file path to them?

Yeah, it’s the number of allowed layers.
Each layer takes a little bit of memory, but other than that there is no overheat unless those layers are actually used. Three seems like a fairly reasonable starting point.

No, it works similarly to sound files. It will search for them in the font path and pick them up and use them automatically. Note that what it looks for is an SCR file. The SCR files are short text files which can specify which PQF file to play for each layer on the display. You can find some information about SCR files here:

You can also find a complete example, but made for a larger display here: