Atomic14's ESP32-CAM Hack Sorts Out the WS2118 LED String Tangle Well Ahead of the Holidays

By mapping the physical location of each individual LED, Atomic's project lets you display patterns without untangling anything.

Pseudonymous maker "atomic14" is getting a head start on holiday decorating with a neat hack: A computer vision system based on the ESP32-CAM development board that puts an end to needing to untangle RGB LED lighting strings.

"I had a big bundle of WS2811 addressable RGB LEDs. I wanted to see if I could use my ESP32-CAM board to do some simple image processing to bring some order to the LEDs," Atomic explains of the general concept — a system for organizing randomly-distributed addressable LEDs. "It works surprisingly well for simple geometric patterns. With more LEDs, I think you could probably get to the point where you could show text and maybe even videos."

The build centers around the low-cost ESP32-CAM, launched two years ago as an ultra-compact computer vision development board featuring an Espressif ESP32-S system-on-chip, microSD storage, and a two megapixel camera alongside Wi-Fi and Bluetooth connectivity. The software captures an image of the tangled LED string, then calculates the location of each individual LED — allowing the user to address LEDs by physical location rather than where they are along the string.

"All the code is on GitHub — would love to know what you think and if you've got some LEDs lying around try out the code and see how it works for you," Atomic writes. "You could probably easily modify the code to use a simple web camera and move the image processing to the JavaScript side of things. This would let you use a standard ESP32 board for controlling the LEDs."

The software is available on Atomic's GitHub repository, and requires only Python 3, Node.js, and Yarn on the host computer.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles