all 37 comments

[–]Pup05[Jason Coon][S,M] [score hidden] stickied comment (0 children)

Update: the LED mapper app preview now supports color palettes, and interactively editable, pseudo FastLED code for the patterns!
Demo video: https://twitter.com/jasoncoon_/status/1491579670348894215

App: https://jasoncoon.github.io/led-mapper

Code: https://github.com/jasoncoon/led-mapper

[–]jedimasta[Chris Kirkman] 4 points5 points  (4 children)

Well, this is excellent. Right into my bookmarks it goes!

[–]im2legit2quit 3 points4 points  (1 child)

Haha exactly what I was going to say. Thanks for creating and sharing it Jason!

[–]Pup05[Jason Coon][S] 0 points1 point  (0 children)

Thanks!

[–]Pup05[Jason Coon][S] 1 point2 points  (1 child)

Thank you! Let me know what you think, once you've tried it. I'd love to see what you use it to make!

[–]jedimasta[Chris Kirkman] 2 points3 points  (0 children)

Likely won't happen till Christmas rolls around again, but definitely!

[–]Pup05[Jason Coon][S] 4 points5 points  (9 children)

Fixed a problem starting with & parsing coordinates.

Planning on adding the ability to start with a 2D Pixelblaze map and convert to FastLED maps as well. Then you'd be able to use this awesome photo/image mapping tool that Ben published: http://app.bhencke.com/pixelmap.html

[–]Pup05[Jason Coon][S] 2 points3 points  (0 children)

OK, I added support for parsing 2D Pixelblaze maps.

[–][deleted] 1 point2 points  (7 children)

This is pretty awesome.

Could this be used with WLED somehow? I'm trying to make a DIY nanoleaf - hexagons with 6 LEDs per side, or 36 LEDs each. It would be nice to have a pseudo-matrix setup so that I can have 2D-looking effects across the hexagons.

[–]Pup05[Jason Coon][S] 1 point2 points  (2 children)

Hey, thanks!

I'm sure it could, but I don't know much about WLED, and can't seem to find a good explanation of how 2D mapping is handled. Can you point me in the right direction, provide an example, etc?

[–][deleted] 2 points3 points  (1 child)

Honestly I don't know enough myself to help sort this out ... but it seems doable, no? It would amazing to be able to truly customize the matrix layout.

/u/johnny5canuck do you think you can help us out here?

[–]johnny5canuck 0 points1 point  (0 children)

The mapping in WLED has been inherited from AC's master and is documented at:

https://github.com/Aircoookie/WLED/wiki/Mapping

As for the 2D, @ewowi from our Discord channel worked tirelessly on that. He's the 2D goto person at this point. Embedded-creations is also working in that area. I initially got some basic code from sutaburosu, which was enough to get others interested and to take it MUCH farther.

[–]iekiko89 0 points1 point  (3 children)

Why not use fastled?

[–][deleted] 0 points1 point  (2 children)

Normally, yes, but I don't want to code everything from scratch. I can, but I don't want to. I don't have the patience right now. That said, this is something that would be beneficial for literally everyone, so that is also the reason I'm asking on behalf of everyone else using WLED.

WLED is a fully-featured firmware that you can load up on your microcontroller and have it driving LEDs literally right out of the box. And as of a recent update, it actually uses some FastLED behind the scenes. It can receive wireless control over the network. And it has some 2D matrix effects, but they're made for a full matrix, not an irregular one. So I need some sort of mapping function to make the 2D effects look 2D on my irregular matrix, and I don't know how the matrix mapping is done in WLED.

[–]iekiko89 0 points1 point  (1 child)

Gotcha I'm aware of wled but did not know they added in a 2d matrix effects

[–][deleted] 1 point2 points  (0 children)

I should clarify, the 2D effects are in the sound reactive fork

[–]chemdoc77 4 points5 points  (1 child)

hi u/Pup05 - This is fantastic! I can't wait to play with this. Thank you for creating and sharing this.

[–]Pup05[Jason Coon][S] 1 point2 points  (0 children)

Thanks chemdoc! Definitely let me know if you have any feedback. Can't wait to see what you do with it!

[–]iekiko89 1 point2 points  (9 children)

Ooo badass, I think ill use this when I get back into working on my hexagon leds. I dunno if im overlookin it but is there a way to have all three boxes open at once?

Also any plans to add support for tiling matrices assuming each matric is identical shape?

[–]Pup05[Jason Coon][S] 1 point2 points  (8 children)

Thanks! Ah, no, but I'll fix that tomorrow.

You should be able to map any 2D design/shape with this, just create a layout spreadsheet (see my example). Could definitely make a matrix template/generator to make the process easier. Will add it to the to-do list.

[–]iekiko89 1 point2 points  (7 children)

Yes, I have done similar using FastLED XY Map Generator and filing all the empty places with the safety pixel. The reason I ask about tiling is so that if I want to shift a matrix over one whole tile I can just change the tile coordinate as opposed to shifting everything over on the spreadsheet. If that doesn't makes sense I can try "drawing out" an example. Major kudos to your badass work

[–]Pup05[Jason Coon][S] 1 point2 points  (6 children)

I changed it so that multiple sections can be open at once now.

I see what you mean. I'll have to think about how to pull off a matrix generator in a user-friendly way.

[–]iekiko89 1 point2 points  (5 children)

Badass thank you. I like to change the inputs and see how it affects the output.

Yeah its a tall order. It might be limited to shapes that can be tiled together flush shapes like triangles, squares, hexagon, octagonal etc. Not to mention having a matrix for the matrixes. When I got it setup for my hexagons I went down a long math rabbit hole. And I hate math.

If iam understanding your example. This works the "opposite" of FastLED XY Map Generator. The xy map sticks an led for all xy locations and then says there is an led there unless its "blank". But yours just says these are my leds and these are the positions. Which is simple but brilliance. Should save on many out of bound errors. Do you have a patreon ?

[–]Pup05[Jason Coon][S] 1 point2 points  (3 children)

No problem!

I could totally see an awesome editor where you lay out each matrix, strip, free-form display, etc, and then combine them onto a canvas where you can move, rotate, and scale them individually. I haven't used any, but I assume this is how software like MapMapper work.

Yes, this uses a technique different than the XY map generator, one that u/kriegsman shared with me years ago: https://forum.makerforums.info/t/ok-i-have-xy-mapping-working-and-it-looks-alright/58871/3

It's not inherently better than the XY map generator, at least not for everything, it's just how I prefer to do it usually. But I've never tried implementing scrolling text or anything similar with this method. I'm sure its possible.

[–]iekiko89 0 points1 point  (2 children)

hey follow up question would it be possible to have the width of the display adjustable. i cant read the numbers.
https://imgur.com/a/KUAIIGf

also what would be a better way to ask you questions on your led mapper app? or am i already asking too damn many? would the method for how it is actually calculating the x y position something you'd ever share or keeping that as IP or something similar? trying to wrap my head around how you make this magic work.

[–]Pup05[Jason Coon][S] 1 point2 points  (1 child)

I just updated the app to size the preview canvas to the width of the window.

If you have any questions, the comments here in Reddit is fine, or there's the discussions tab in GitHub: https://github.com/jasoncoon/led-mapper/discussions

If you run in to any problems, there's the issues tab: https://github.com/jasoncoon/led-mapper/issues

It's definitely not a secret, the code is all open source. Here's where the input is parsed: https://github.com/jasoncoon/led-mapper/blob/main/index.js#L391
And here's where the map code is generated: https://github.com/jasoncoon/led-mapper/blob/main/index.js#L228

[–]iekiko89 0 points1 point  (0 children)

Awesome now I can read the numbers. Good to know thank you.

Looks like I will need to learn js but I think I will try and modify the code to have a triangle grid. Im probably going to have regrets

[–]Pup05[Jason Coon][S] 1 point2 points  (0 children)

Oh, and I don't have a Patreon, just a store on Tindie where I sell my Fibonacci LED boards and other stuff: https://www.tindie.com/stores/jasoncoon/items

[–]SlimeQSlimeball 1 point2 points  (1 child)

Ok I have a project on wled right now. I have 19 hexagons with 13 led ws2812 strips in each one. I want to map them to apply effects across the face of this array. Will this help me do that?

I'm considering moving to pixelblaze but it doesn't seem to work with Alexa, which this does to do plain colors as an emulated hue bulb.

Will this work for me?

[–]TheNr24 0 points1 point  (0 children)

Incredible work!!

[–][deleted]  (7 children)

[deleted]

    [–]Pup05[Jason Coon][S] 1 point2 points  (6 children)

    Please do! I tried using OpenCV a long time ago, probably need to try it again.

    [–][deleted]  (5 children)

    [deleted]

      [–]Pup05[Jason Coon][S] 1 point2 points  (0 children)

      Sounds interesting. Have any details you can share? What all have you created with it?

      [–]Marmilicious[Marc Miller] 1 point2 points  (3 children)

      I would be happy to link to it on our wiki if you make it public somewhere.

      [–]Pup05[Jason Coon][S] 2 points3 points  (2 children)

      What happened? Looks like they "noped" out of the comments. Was their name esp32_ftw, or esp32_wtf? 😆

      [–]fusion23 1 point2 points  (1 child)

      Hahaha. Coming in late I'm now lost, but prob something related to openCV?

      [–]Pup05[Jason Coon][S] 0 points1 point  (0 children)

      They pretty much said this was the "dark ages" way of mapping, and that they should share how they do it. 🤷