Skip to content

A project to find 3D coordinates addressable LEDs on a decorative tree, and animate them.

License

Notifications You must be signed in to change notification settings

Valthoron/TreeLights

Repository files navigation

TreeLights

Here is (most of) the Python code I used to map and animate 500 LEDs on my tree. The whole project is inspired by Matt Parker from Stand-up Maths on YouTube, so watch these if you haven't already:

I used a WS2811 LED strip connected to a Raspberry Pi Zero W, and a host computer with a webcam to capture, process and simulate the LEDs.

  1. capture.py talks to the Pi Zero to individually light each LED and take a picture.
  2. process.py performs some basic image processing and curve fitting to calculate the coordinates of each LED.
  3. simulate.py visually simulates animation programs.

Each file (hopefully) has further explanations inside. Have fun.

Dependencies

Dependencies can be installed using: pip install -r requirements.txt

Earlier versions may also be compatible.

Licensing

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

About

A project to find 3D coordinates addressable LEDs on a decorative tree, and animate them.

Resources

License

Stars

Watchers

Forks

Languages