✨ New Arrivals Just Dropped!Explore
HomeStore

Mini GPIO Xmas Tree

Mini GPIO Xmas Tree

We're stocking this super-cute mini GPIO Xmas Tree for the Raspberry Pi this year as an uber-affordable way to add a little festive fun to your projects, as we all know that December can be expensive enough as it is!

The Mini GPIO Xmas Tree for the Raspberry Pi includes 5 LEDs that can be controlled from a simple Scratch or Python program. When programming your tree, you need to know the GPIO pin number associated with each LED (see below). Setting a GPIO to output high will turn the LED on whilst setting it low will turn it off - easy!

The tree should be connected to the six GPIO pins as shown here. Ensure the LEDs are facing outwards like this:

The GPIO numbers for each LED are as follows:

Works with Scratch!

Do you want to use Scratch 3 to control the LEDs on your tree? If so, click the Add an Extension icon, find Raspberry Pi GPIO and click on it. You can then drag blocks to construct either of the sample programs shown below

Scratch Example 1

Scratch Example 2

Use with Python via Thonny

To control the tree using Python, open Thonny and enter this example code:

from gpiozero import LEDBoard
from time import sleep

tree = LEDBoard(26, 13, 6, 19, 5)

while True:
    
    # illuminate the top and bottom LEDs
    tree.value = (1, 0, 1, 0, 1)
    sleep(0.5)
    
    # illuminate the middle row of LEDs
    tree.value = (0, 1, 0, 1, 0)
    sleep(0.5)

Compatible with Other Dev Boards!

Each LED is wired through a 330-ohm resistor, meaning you can use this with other development boards such as the Raspberry Pi Pico by simply connecting manually with jumper wires to your board's GPIO pins and writing code to control the GPIO pins HIGH/LOW.

Circuit Diagram

Here is the circuit diagram for the tree:

Package Contents

  • 1x Mini GPIO Xmas Tree

Raspberry Pi/wires not included

$1.40

Original: $4.00

-65%
Mini GPIO Xmas Tree

$4.00

$1.40
Product image 1
Product image 2
Product image 3
Product image 4
Product image 5
Product image 6

Description

We're stocking this super-cute mini GPIO Xmas Tree for the Raspberry Pi this year as an uber-affordable way to add a little festive fun to your projects, as we all know that December can be expensive enough as it is!

The Mini GPIO Xmas Tree for the Raspberry Pi includes 5 LEDs that can be controlled from a simple Scratch or Python program. When programming your tree, you need to know the GPIO pin number associated with each LED (see below). Setting a GPIO to output high will turn the LED on whilst setting it low will turn it off - easy!

The tree should be connected to the six GPIO pins as shown here. Ensure the LEDs are facing outwards like this:

The GPIO numbers for each LED are as follows:

Works with Scratch!

Do you want to use Scratch 3 to control the LEDs on your tree? If so, click the Add an Extension icon, find Raspberry Pi GPIO and click on it. You can then drag blocks to construct either of the sample programs shown below

Scratch Example 1

Scratch Example 2

Use with Python via Thonny

To control the tree using Python, open Thonny and enter this example code:

from gpiozero import LEDBoard
from time import sleep

tree = LEDBoard(26, 13, 6, 19, 5)

while True:
    
    # illuminate the top and bottom LEDs
    tree.value = (1, 0, 1, 0, 1)
    sleep(0.5)
    
    # illuminate the middle row of LEDs
    tree.value = (0, 1, 0, 1, 0)
    sleep(0.5)

Compatible with Other Dev Boards!

Each LED is wired through a 330-ohm resistor, meaning you can use this with other development boards such as the Raspberry Pi Pico by simply connecting manually with jumper wires to your board's GPIO pins and writing code to control the GPIO pins HIGH/LOW.

Circuit Diagram

Here is the circuit diagram for the tree:

Package Contents

  • 1x Mini GPIO Xmas Tree

Raspberry Pi/wires not included

You may also like

NEW
Thumbnail 1Thumbnail 2

Troika Practicable - Pocket Fast Charging Cable

$24.16

NEW
Thumbnail 1Thumbnail 2

M5Stack StackChan

$125.44

-70%NEW
Thumbnail 1Thumbnail 2

Ansmann Magnetic 4-in-1 Charging Cable

$22.38

$6.71

-70%NEW
Thumbnail 1Thumbnail 2

Ansmann Magnetic USB-C to USB-C Cable

$17.10

$5.13

-65%
Thumbnail 1Thumbnail 2

Raspberry Pi 4 Model B Starter Kit

$57.00

$19.95

-65%
Thumbnail 1Thumbnail 2

Antex XS25 Soldering Iron (UK Plug)

$34.30

$12.00

Thumbnail 1Thumbnail 2

CamJam EduKit #2 - Sensors

$9.00

Thumbnail 1Thumbnail 2

CamJam EduKit #3 - Robotics

$20.00

Thumbnail 1Thumbnail 2

Learn to Solder Zoo Animal Badge Kit

$16.80

-65%
Thumbnail 1

CamJam EduKit

$6.00

$2.10

-65%
Thumbnail 1Thumbnail 2

Raspberry Pi DOTs Board for Minecraft

$1.50

$0.52

-65%
Thumbnail 1Thumbnail 2

RasPiO Portsplus GPIO Board

$2.50

$0.88