I programmed my RGB Christmas tree lights with a Raspberry Pi to display various effects
- /RaspberryPi
- Corporate
- Posts: 2449
- Joined: Wed Jun 05, 2019 1:29 am
I programmed my RGB Christmas tree lights with a Raspberry Pi to display various effects
https://preview.redd.it/hnbxvumj9h9c1.png?width=510&format=png&auto=webp&s=16c74f47b167c33d1817b1e778126095fca7d2f5
Code (with some GIFs): https://github.com/Asa-Nisi-Masa/christmas-tree
Hi! I programmed addressable RGB LED Christmas lights to display various effects. Inspiration came from this video by Matt Parker (did not use any of his code though): https://www.youtube.com/watch?v=TvlpIojusBE
The workflow is as one would expect - position of each LED has to be calculated in 3D space - for this, each LED is lit up one-by-one, and, this process is repeated from multiple angles. 3D positions are then computed from the captured images. I used my laptop's camera to capture the images by sending HTTP requests to the server running inside the Raspberry Pi.
One thing I strived for is the ability to prototype effects without LEDs. Effects on a Christmas tree can be 'simulated' in a 3D render - so even before I had the LEDs themselves I was already writing the effects. I made sure that moving from simulation to the real thing is as seamless as possible (basically the code for effects can be reused between simulations and the Raspberry).
Let me know what you think!
submitted by /u/ASA--NISI--MASA
[link] [comments]
Source: https://www.reddit.com/r/raspberry_pi/c ... ts_with_a/
/RaspberryPi