“I love this tree, extremely easy to assemble and code! I have done a few fancy effects, but my favourite is actually this really simple one with nice clear, balanced colours and runs perfectly on a Pi Zero:
----------
from tree import RGBXmasTree
import random
tree = RGBXmasTree()
try:
while True:
pixel = random.choice(tree)
pixel.color = (.6,0,0)
pixel = random.choice(tree)
pixel.color = (.3,.3,0)
pixel = random.choice(tree)
pixel.color = (0,.6,0)
pixel = random.choice(tree)
pixel.color = (0,.3,.3)
pixel = random.choice(tree)
pixel.color = (0,0,.6)
pixel = random.choice(tree)
pixel.color = (.3,0,.3)
except KeyboardInterrupt:
tree.close()
----------
Feel free to share the code as an extra example if you want! Merry Christmas to everybody out there with Pi's (I have a 4b, 3b+ and three Zero's)”
“Wonder little product to have a tinker with, and it really brightens up my desk at work.
As I work primarily in .Net, and couldn't find any .Net examples, I have made a NuGet package available if anyone else wishes to use it. (https://www.nuget.org/packages/CutilloRigby.Iot.RgbXmasTree/)
The source code is available at https://github.com/mcrigby/rgbxmastree”
“Last year I hooked up this great little RGB Christmas tree to an old Raspberry Pi but that has now been used for another project so I decided this time around to run it on a microcontroller like another reviewer, with the terrific WLED firmware from Aircoookie. I chose an ESP32 as I have a big Espressif dev board kicking around as my working platform but an ESP8266 would work equally well. For the ESP32 you will need an APA102 variant of the WLED firmware which is described in this discussion thread: https://github.com/Aircoookie/WLED/issues/1107 and the binary can be found here: https://drive.google.com/file/d/11ngCNZkkiR7xlRa2PmiEHxZldFR_b_rP/view?usp=sharing. I mounted it all on a small prototyping PCB with the following pinouts and it looks fab on my desk: https://drive.google.com/file/d/17jjdHD30eFu0qjeHgd8g56F6Nil5rlu0/view?usp=sharing. It's also a great way to get started with microcontrollers or if you just want to get the Christmas tree up and running without the programming effort.
Tree header -> ESP32
2 -> 5V
6 -> GND
22 -> GPIO0 (CLK)
32 -> GPIO2 (DATA)”
“For this Christmas I decided to connect the tree to an ESP32 microcontroller, having used last year's Raspberry Pi for another project.
If anyone else wants to do the same, the relevant pins on the tree header are 2 -> 5V, 6 -> GND, 22 -> CLK and 32 -> DATA. There are a bunch of other GND pins too, if it makes your cabling easier. The tree appears to use a variant of APA102 so you'll need to bear that in mind when choosing the controller software. Like another reviewer (Steve) I went with the terrific WLED by Aircoookie, which includes WLAN/Bluetooth, smartphone app and a ton of patterns, effects, timers etc. I struggled a bit to find a binary with APA102 support till I came across this thread (https://github.com/Aircoookie/WLED/issues/1107) which includes a link to the correct binary: https://drive.google.com/file/d/11ngCNZkkiR7xlRa2PmiEHxZldFR_b_rP/view?usp=sharing. After flashing and testing my controller, I hooked everything up on a small prototyping board and powered it all from the micro USB port on the controller. Here's how it looks: https://drive.google.com/drive/folders/10LaOeZfOCmWrNwZTGtbHPjNwOy4UGL3Q?usp=sharing.”