SteveEisner / WLEDtubes

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
https://kno.wled.ge
MIT License
23 stars 2 forks source link

WLED-based LED Sticks

These portable LED light poles make pretty lights for a dance party - and better yet:

They're portable! Convenient tripod bases keep them standing at attention, and a 10Ah USB battery (like the one you charge your phone with) will power them for about 8 hours.

They're versatile! You can deploy them in a wide open space at Burning Man, in a private event space, or right next to each other in your living room. (Click into these links for videos of them in action.)

They're coordinated! If you put them next to each other, they sync using near-field radio. And they'll even daisy-chain, meaning the furthest ones can be really far apart as long as there are some in the middle to relay the signal.

IMG_1521

They're sturdy! I built over 100 of them and have deployed them at parties in all kinds of weather, from hot & dusty windstorms to torrential rain. They've been tossed in a truck, carried around as totems, knocked or blown over, and almost all of 'em are still working. Just don't let people use them like light sabers (lesson learned.)

They're also in progress with lots of things that could be improved. But for now:

How do they work?

Each light tube is running custom software on an ESP32 microcontroller. The software is running a generative light program, based on the popular software WLED, that has a simple "DNA" specifying its pattern, color, effects overlay, offset, and so on.

The patterns run on a clock that's synced to a specific BPM and counts out the 4/4 rhythm of most dance music, so they morph and change on individual beats, measures, and phrases. After several beat phrases pass, a pole's DNA is mutated a little, which can cause it to change color, or adopt a new pattern, etc.

On-board radio lets a light pole broadcast its DNA and clock timer; when others hear the signal, they can choose to follow along by updating their own pattern DNA to match it. The method of coordination is pretty simple right now: each pole has an 8-bit ID, and lower-ID poles obey higher-ID poles.

If they're all close enough, they'll soon start doing the same thing as a group and keeping their clock timers in sync. In case they're not close enough, poles also re-broadcast all the signals they receive and obey. This lets them pass along a signal through the group until all of them have found it.

Some randomness and chaos is intentional. Radio isn't 100% reliable, so they sometimes fall out of contact and then re-connect. And in some cases, the poles will deliberately offset their own clock a bit so that they are clearly doing the same thing but not exactly at the same time. Each tube is actually running several copies of the software and smoothly "cross-fading" between them, to avoid any jarring transitions.

Credits

The form factor was inspired by Mark Lottor's Hexatron. The color schemes were inspired by the work of Christopher Schardt and many were found on cpt-city. My most recent versions use the excellent WLED codebase and run as a usermod. My older code was written using FastLED and I still use some original patterns that are evolved versions of FastLED examples. The mesh networking is based on Chuck Sommerville's led-swarm, and still follows its theory for radio connection. When I kicked off this project, I used Paul Stoffregen's WS2812Serial for smooth animation, and of course his Teensy CPU made the whole thing possible. Standing on the shoulders of these giants let me create these in about a month, in time to debut at Burning Man 2019 and appear at many parties since!

WLEDtubes branch changes

This is a WLED-based update to my 2019 light tube project, which ran on Teensy + FastLED + nRF24L01 radios.

Most of the changes are in the usermod usermods/Tubes:

Mesh networking is based on a unidirectional broadcast protocol:

The Tubes usermod uses several sub-libraries and helper functions:

There are several left-over modules that aren't used any more.

Also, there a few changes to core library files:

Original README: Welcome to WLED! ✨

A fast and feature-rich implementation of an ESP8266/ESP32 webserver to control NeoPixel (WS2812B, WS2811, SK6812) LEDs or also SPI based chipsets like the WS2801 and APA102!

Now with new magical sync powers!

⚙️ Features

💡 Supported light control interfaces

📲 Quick start guide and documentation

See the documentation on our official site!

On this page you can find excellent tutorials and tools to help you get your new project up and running!

🖼️ User interface

💾 Compatible hardware

See here!

✌️ Other

Licensed under the MIT license
Credits here!

Join the Discord server to discuss everything about WLED!

Check out the WLED Discourse forum!

You can also send me mails to dev.aircoookie@gmail.com, but please, only do so if you want to talk to me privately.

If WLED really brightens up your day, you can

Disclaimer:

If you are prone to photosensitive epilepsy, we recommended you do not use this software.
If you still want to try, don't use strobe, lighting or noise modes or high effect speed settings.

As per the MIT license, I assume no liability for any damage to you or any other person or equipment.