View All Posts
read
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi

Transform your Christmas tree into an interactive light show using a string of 200 WS2811 addressable LEDs, self-organizing LEDs project, and an ESP32 to drive them. Learn how to map images onto LED locations and create amazing visual effects.

Related Content
Transcript

[0:00] The tree is up.
[0:01] It’s nice, but it’s not good enough for this channel!
[0:03] How about making it respond to music?
[1:41] Or perhaps we’d like it to say “Happy Christmas”!
[1:44] Happy Christmas everyone! I hope you have a great holiday
[1:54] Or we can just show a bunch of different animations.
[1:57] We can show all sorts of geometric patterns and animate them over the tree.
[2:01] But if you wanted to, you could get quite fancy.
[2:04] I’ve kept it pretty simple with wipes from side to side and top to bottom.
[2:08] But you could really go to town if you wanted to.
[2:11] I was very tempted to try and rickroll you all but thought better of it.
[2:15] So what’s going on?
[2:16] Let’s find out after this quick plug for the channel sponsor PCBWay…
[2:23] Do you like PCBs?
[2:24] Do you want to make a PCB with a weird and wacky color like purple?
[2:28] Maybe you’d like a flexible PCB?
[2:30] Or maybe you’d like someone to do some CNC work for you?
[2:33] Check out the link to PCBWay in the description.
[2:39] So what’s happening?
[2:40] I’ve got a string of 200 addressable WS2811 LEDs running up the tree.
[2:45] I’ve just put them on as you would a normal set of Christmas lights and I’m using my

[2:50] self-organizing LEDs project along with an esp32 to drive them.
[2:55] To make it work we just need to calibrate the position of each led on the string.
[2:59] This is done using some really simple image processing and a steady hand.
[3:04] We grab a frame from the camera with all the LEDs turned off and then we light each led in turn.
[3:09] Grabbing a frame from the camera each time we light an LED we can then simply compare the

[3:15] unlit frame with the lit frame to calculate the approximate position of the lit LED.
[3:20] With all the LED positions calculated we then just map whatever image we want onto these locations.
[3:26] In my implementation, I just create a frame buffer that I can draw an image onto

[3:31] and then for each LED I work out what color it should be from the drawn image.
[3:35] There’s really nothing clever going on and provided your tree is in the corner of the

[3:39] room so you don’t need a 360-degree mapping you get a pretty good effect.
[3:44] So let’s gather around the roaring fire and have a great Christmas.
[3:47] I’ll see you all in the new year if not before


HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
Blog Logo

Chris Greening

> Image

atomic14

A collection of slightly mad projects, instructive/educational videos, and generally interesting stuff. Building projects around the Arduino and ESP32 platforms - we'll be exploring AI, Computer Vision, Audio, 3D Printing - it may get a bit eclectic...

View All Posts