Using WS2812B strips as a matrix #676
Replies: 3 comments
-
Hi, and welcome.
The literal answer to the question you asked is "no". But that's probably
not the answer you're looking for.
The pixel-blasting code likes to think that there's one giant pixel array
that gets sent to a device. You've surely seen references to gfx->leds[]
everywhere in the various effects. The "trick" is to slice that strip up,
exactly like you've done physically, only logically.
There's a MATRIX_HEIGHT and MATRIX_WIDTH defined in the header, but for
things that aren't HUB75, they're not used super consistently. (The 3-panel
audio spectrum analyzer is probably the most notable exception.) There is
a combination of a macro (gfxbase.h:XY), a function (gxfbase.cc:XY) and a
virtual method (gfxbase:xy) that may be in play. I THINK if you set
MATRIX_HEIGHT and MATRIX_WIDTH to appropriate values for your frame, you
should (might?) fall into the definition of xy() that handles the common
xy-looping model you're describing. There's even ASCII art to describe it.
So set those two #defines, confirm with your debugger that _height and
_width are set correctly when GFXBase is constructed in gfxbase.cc:254 or
so, sanity check that GetLEDCount() matches what you think it should be,
and then see if our various matrix-aware code will play nice. We have a
bunch of convenience operators like drawPixel() that takes x, y that should
make manging them as a grid much more palatable.
I've thought about adding virtual scrolling marquee text for hardware like
the aforementioned wide panels of the 16x16 panels. I think we already have
fonts in the project for Mesmerizer.
Good luck!
…On Sat, Jan 11, 2025 at 9:44 PM Gray Oron ***@***.***> wrote:
Hi!
I have a bunch of 4' long WS2812B strips mounted on strips of wood that
are mounted with 3d printed clips, allowing me to use them in different
configurations. I would love to use them as a matrix as well (to create
wider effects or to display text). For the life of me I cannot figure out
if there is an actual simple way to define a matrix zigzagged led strips in
the projects (I have an din and dout on the ends, so I would just ideally
chain them and inject some power ever so often).
Help please!
Oh, I am running them on Seeed Studio esp32-s3 which was not too hard to
do with this project, but have not added too many effects so far...
—
Reply to this email directly, view it on GitHub
<#676>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCSD37V5D4W7Q34NTSHQWD2KHQIFAVCNFSM6AAAAABVATD666VHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZXHAYDSNZVHA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
GrayOrion
-
Thank you @robertlipe! |
Beta Was this translation helpful? Give feedback.
0 replies
-
I think you'll find all the needed pieces there. The gate was on "simple".
Certainly the spectrum project uses all the parts as the 8x8 panels that it
uses are wired in the same layout as you're describing. It sets up width
and height at
https://github.com/PlummersSoftwareLLC/NightDriverStrip/blob/08d1895783da955584534930ee3e329b6b87ec2e/include/globals.h#L597
It is then able to address them at the software level like an x/y frame
buffer.
Good luck!
…On Mon, Jan 13, 2025, 3:20 PM Gray Oron ***@***.***> wrote:
Thank you @robertlipe <https://github.com/robertlipe>!
That gives me plenty to work from, good to know there is no (clear)
implementation of that yet.
I might just have to document my steps well and post something here for
future reference, or better yet, suggest some code/config changes :-)
—
Reply to this email directly, view it on GitHub
<#676 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCSD3YP3IP2R2ESL2Y6R4T2KQUYHAVCNFSM6AAAAABVATD666VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBSGQ4DINI>
.
You are receiving this because you were mentioned.Message ID:
<PlummersSoftwareLLC/NightDriverStrip/repo-discussions/676/comments/11824845
@github.com>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I have a bunch of 4' long WS2812B strips mounted on strips of wood that are mounted with 3d printed clips, allowing me to use them in different configurations. I would love to use them as a matrix as well (to create wider effects or to display text). For the life of me I cannot figure out if there is an actual simple way to define a matrix zigzagged led strips in the projects (I have an din and dout on the ends, so I would just ideally chain them and inject some power ever so often).
Help please!
Oh, I am running them on Seeed Studio esp32-s3 which was not too hard to do with this project, but have not added too many effects so far...
Beta Was this translation helpful? Give feedback.
All reactions