Holiday Tree
Smart Holiday Tree with 26 LEDs
- Overview
- Commands
- Samples
- On-Module Code
Holiday Tree is a stand-up DUELink microcomputer in the shape of a Christmas tree — two PCBs (A and B) slide into each other for a 3D look. 26 individually addressable LEDs and an on-board buzzer let you choreograph lights and sound however you want.
A USB cable is included, so the tree plugs directly into a computer or a phone charger and works out of the box. Code it in Python, JavaScript, .NET, Arduino, or C++, or run it standalone with MicroBlocks — it ships pre-loaded with MicroBlocks firmware.
Pick Holiday Tree for seasonal projects students can take home, classroom decor that does something more than blink, or just a desk ornament with personality. Project assets at holidaytree.duelink.com.
Key features • Stand-up Design | Resources 📄 Schematics PID: 0x0C0003 |
Modules ship without cables to reduce waste. Some specialty boards include a USB cable; for the rest, see Cables to add cables to your order.
Commands this module accepts. See Samples for runnable code in popular host languages.
| Function | Description |
|---|---|
PlayLED(enable) | PlayLED(1) will make the LED constantly blink, default. Use PlayLED(0) to disable playback and manually control the LEDs. |
SetLED(i, c, l) | Sets a specific LED, i index (index start from 1), to a c color (hex value), l brightness (0 off, max 31). |
SetAll(color) | Sets all LEDs to a specific color, use 0 to turn off. |
ShowLed() | Flush Leds, and show. |
RndLed() | Show random color on random leds. |
Buzzer(f,d) | Play buzzer with f frequency and d duration in milliseconds. This is blocking function. |
DVer() | This driver version. |
Peek under the hood
The script below is this module's driver — it teaches the hardware how to respond to the commands listed above. It ships pre-loaded from the factory; most users never need to open it.
loading...
Example code that calls this module's commands from popular host languages.
New here? See Get Started to connect a module and send your first command.
- Python
- MicroPython
- JavaScript
- .NET
- Arduino
- MicroBlocks
loading...
loading...
loading...
loading...
loading...
This sample runs in MicroBlocks on a any host board that's connected/tethered to this module, or a chain of modules. This module keeps its official DUELink firmware and module driver and responds to commands from the connected MicroBlocks-running host. New here? See the MicroBlocks page.
There are two ways to use it:
Open the full sample — the complete project (the module's library plus a ready-to-run example) opens directly on the MicroBlocks website.
Add just the libraries to your own project — copy the link, then in your MicroBlocks project click Add Library → Cloud and paste it. This loads this module's libraries into your project without replacing your current work.
Copy Library LinkCode that runs directly on this module's MCU. See how On-Module Code allows modules to run standalone.
- Script
- Arduino IDE
- MicroBlocks
This example runs using the default DUELink Internal Engine using its Scripting Language, and it expects the module's driver to be loaded first, see the Commands Tab.
loading...
See Arduino IDE page for more info.
loading...
This project runs standalone. It assumes that the MicroBlocks firmware is already loaded on the module.
Click the button below to open, edit, and run the project directly on the MicroBlocks website.
Ordering Info
| Product | Part Number | Price |
|---|---|---|
| DUELink Holiday Tree | GDL-SPTREE-B | $24.95 |