Skip to product information

Mini GPIO Xmas Tree

Mini GPIO Xmas Tree

โœ… Made In USA

โœ… Quick Delivery

โœ… Cruelty Free

 (88 Reviews)
Regular price $3.93
Regular price $3.93 Sale price $5.39
SAVE 27% Sold out
 
add_shopping_cart

-

Ordered

local_shipping

- - -

Order Ready

redeem

- - -

Delivered

Mini GPIO Xmas Tree by PocketMoneyTronics - The Pi Hut

Mini GPIO Xmas Tree

Regular price $3.93
Regular price $3.93 Sale price $5.39
SAVE 27% Sold out

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

  • Share positive thoughts and feedback from your customer.

    Author
  • Share positive thoughts and feedback from your customer.

    Author
  • Share positive thoughts and feedback from your customer.

    Author
    check_box

    Collapsible row

    View full details