<p><a href="https://tuxjam.otherside.network/">TuxJam</a> co-host <a href="https://mastodon.me.uk/@kevie">Kevie</a> continues his series on Raspberry Pi projects with a look at the <a href="https://thepihut.com/products/3d-rgb-xmas-tree-for-raspberry-pi">3D RGB Xmas Tree</a> from The Pi Hut. This is compatible with all of the Raspberry Pis,and, if you are going to use this as a stand alone Christmas decoration, it is recommended that you use <a href="https://www.raspberrypi.com/software/operating-systems/">RaspberryPi OS Lite.</a></p>
<p>Obviously there does need to be a bit of setup, it is not plug and play, but that would be boring for a Pi project; wouldn't it? As I said: I used mine with a Pi Zero 2W and if you are starting from scratch then I would recommend using Pi Imager as this will allow you to set a user, password, automatic login, wifi and SSH. Call it something like tree for the client name on the network so that it is easy to find. Doing all of this will mean that this Pi never needs to be connected to a monitor. The notes below should take you through the process step-by-step.</p>
<ol>
	<li>Once the tree has been installed and the Pi is booted up, install GPIOZero (this step is only necessary if you installed RaspberryPiOS Lite) <code>sudo apt install python3-gpiozero</code></li>
	<li>Create a new directory: <code>mkdir tree</code> and move into it with <code>cd tree</code></li>
	<li>Now it's time to get the code: <code>wget https://tinyurl.com/3rrezjv9 -O tree.py</code></li>
	<li>I went for the Xmas Tree Sparkle sequence by Rendzina. To get this simply type: <code>wget https://tinyurl.com/5e8cxrb5 -O XmasTree_Sparkle.py</code></li>
	<li>Test out the sequence: <code>python XmasTree_Sparkle.py</code></li>
	<li>To automate the tree we can set a cron task: <code>sudo crontab -e</code></li>
	<li>Add the following lines to the end of the Crontab file: <code>30 22 * * * /sbin/shutdown -h now</code> This shuts it down at 10.30pm every night. <code>@reboot python /home/pi/tree/XmasTree_Sparkle.py</code> This will switch on the tree when the Pi boots up.</li>
	<li>Exit and save.</li>
	<li>Reboot the Pi: <code>sudo reboot</code></li>
</ol>

<p>To take a look at the Pi Hut's starting documentation click <a href="https://github.com/ThePiHut/rgbxmastree?tab=readme-ov-file#getting-started">here</a></p>
<p>Redzina's custom scripts are available <a href="https://github.com/rendzina/XmasTree?tab=readme-ov-file">here.</a></p>
<img src="https://mastodon.me.uk/system/media_attachments/files/113/646/783/843/188/510/original/c77791b11003a222.jpeg" width="33%" alt="A picture of the tree lit up and attached to a Raspberry Pi Zero 2W">
