Watch the video:
I used the sample code that The Pi Hut provided here. I've recreated the software/steps below.
First, connect to your Raspberry Pi. Then, follow the steps below.
Install the required libraries
sudo apt-get install python-gpiozero python3-gpiozero
Create the test Python script
sudo nano ~/.tree.py
Add the following, save, and exit:
from gpiozero import LEDBoard from gpiozero.tools import random_values from signal import pause tree = LEDBoard(*range(2,28),pwm=True) for led in tree: led.source_delay = 0.1 led.source = random_values() pause()
Run the script and make things blinky!
sudo python ~/tree.py
The Raspberry Pi is a wonderfully flexible SBC and easily one of our favorite open-source boards on the market today.