This repository contains the code used for Matt’s Christmas tree, as featured in “I wired my tree with 500 LED lights and calculated their 3D coordinates”.

xmaslights-spin.py is the original source code from the video. Code in the examples folder has been provided by other contributors!


This is a Python project which depends on board for representing an n-dimensional board, and neopixel for communicating with the LEDs.

With these packages installed, run xmaslights-spin.py.


You’re welcome to contribute! There are a few different places that your PR could target:

  • Small bug fixes, as well as small changes that significantly increase usability, will be accepted directly in to the original code.

  • The examples folder has been created as a place for any effects contained within a single Python file. Files should be named based on the effect – fire.py for example.

  • If you’ve done a bigger bit of work, consider keeping this in your own repository, and opening a PR to update the Further Work section below.

Further Work

Links to larger projects based on this one