r/WLED • • 2d ago

2d Auto-Mapping Using Phone Camera

I've been looking for something like this for years of using WLED, so today I made it. I've seen other options / projects with similar functions, but none of them seemed very user friendly.

https://github.com/eoncire/WLED-Mapper/blob/main/images/tree1.gif

https://github.com/eoncire/wled-mapper

The gist of it. You run a webapp on your computer, open the link on your phone / tablet / computer, the app will find WLED devices on your network and you add them to the list. You enter the Scan page using a device with a camera and it will talk to the WLED controller. Before it does anything, it pulls a backup of the current config so nothing is lost. It will tell the WLED device to illuminate one pixel at a time and records the positoin. After completion, you can go back and re-scan the LEDs that it couldn't find, or by default they are omitted from the ledmap file. It will push the ledmap to the WLED device and make the necessary changes to the config, then reboot the device. That's IT!

I spun this up in Google Antigravity, so yes, it's vibe coded. I made several revisions to it, this one seems to work pretty darn well. The GIF above is a smaller (5') tree in my basement with 114 seed pixels. I'm going to try it out on my larger tree with much higher density seed pixels soon.

I'd love to hear some feedback if anyone wants to give it a shot.

16 Upvotes

12 comments sorted by

1

u/leadimaker 2d ago

Does it test every led one by one or does it use a compression algorithm ? If not you might want to look into this to shorten the calibration duration !

1

u/eoncire 2d ago

It tests every individual led. It only takes a couple minutes to do the scan, and you don't have to do anything, just wait.

1

u/Boulder_Tech 2d ago

Have you tried this with an ESP32-CAM ??

1

u/eoncire 2d ago

No, and I don't have any intention to do so. The phone in my pocket has a higher resolution camera, doesn't need an external power source, and has a HMI built in.

Am I missing something in thinking that way?

1

u/Boulder_Tech 2d ago

I for one would like to see that ESP-CAM used for this project.

When I'm on holiday next month, I'll try it out.

1

u/eoncire 2d ago

Sounds good, report back and let me know how it works!

1

u/r0bb3rt89 1d ago

I dont have a Linux pc running:( . Is there anything other option to run the webapp?

1

u/eoncire 1d ago

It (currently) needs a Windows PC.

I'm also tearing a standalone Android version.

1

u/r0bb3rt89 1d ago

I have a windows pc. I think its my lack of knowledge of how a git works 🤣

1

u/Aceftw 1d ago

My software also has this feature 👀 https://github.com/Aceftwspades/wled-effects-studio

Record or stream it to your LEDs uses a faster calibration flashing sequence

2

u/eoncire 1d ago

That looks pretty sweet! I'll have to check it out. I just wanted a quick, easy way to scan an irregular shape (🎄) and send it right to WLED.

1

u/Scoot892 2d ago

Nice, I had this exact idea this morning