Zephyr-based firmware targeting Nordic nRF54L15 based snowflake circuit, found at https://github.com/JackHack96/snowflake-pcb.
Includes BLE functionality and simple animation/control logic with a small host-side utility and web controls.
- Linux with Nordic nRF Connect SDK (NCS) v3.1.1.
westinstalled and toolchain environment initialized
west build -b nrf54l15dk/nrf54l15/cpuappwest flashTwo simple Web Bluetooth tools are included under web/ to control and configure devices directly from your browser:
snowflake-control.html: interactive control panel for a single devicebatch-program.html: configure multiple devices with the same settings
- Use a Chromium-based browser (Chrome or Edge).
- Ensure your OS Bluetooth is enabled and you grant browser permission to access Bluetooth.
From the repository root, start a local server and open the panel:
- Connect: Click "Connect" and select your Snowflake device.
- Identity: Set the device name (advertised over BLE).
- Effect: Choose type and tune parameters:
- Speed (1–10), Brightness (0–255), Option (effect-specific).
- Colors: Set Primary and Secondary RGB colors.
- Timings: Effect-specific durations used by certain effects.
- Debug Mode: Enable a direct LED control mode and set color per LED index.
Changes are sent via GATT characteristics and reflected back via notifications.
- Scan: Add one or more devices via the Bluetooth chooser.
- Configure: Select the effect, parameters, colors, and timings once.
- Naming: Optionally set a prefix and auto-number devices (e.g.,
Snowflake-1,Snowflake-2, …). - Program All: Applies the configuration to each selected device sequentially and disconnects.
All effects use Primary/Secondary colors and common parameters unless noted.
- Solid (0): Steady Primary color at the selected Brightness.
- Breathe (1): Pulsing brightness of the Primary color; Speed controls period.
- Wipe (2): Moving head over a Secondary background; Option influences step size.
- Rainbow (3): HSV rainbow across LEDs; Speed controls hue shift rate.
- Twinkle (4): Random bright sparks on a dim Secondary background; Option = number of sparks per frame.
- Comet (5): Moving bright head with fading tail; Option = tail length; Secondary used for the tail/background.
- Snowfall (6): Layered fade between Primary and Secondary; Option:
- 0: Forward layers with blended fades
- 1: Reverse layer order
- 2: Focused layer transitions with background off
- Diamond (7): Random sparkle brightness over Secondary background; Option = number of sparkles per frame.
- Random Fade (8): LEDs randomly fade from Primary to Secondary.
- Timings:
Fade duration (ms)andSpawn interval (ms)control decay and new spark creation. - Option = number of new sparks per spawn.
- Timings:
- Debug (9): Renders the per-LED debug buffer; use Debug Mode and LED setter in the panel.
The device exposes a custom service (UUID 6e400001-b5a3-f393-e0a9-e50e24dcca9e) with characteristics used by the web panels:
- Name (
6e400008…): UTF-8 string, up to 20 bytes, read/write + notify. - Effect (
6e400002…):uint8effect ID (see catalog), read/write + notify. - Speed (
6e400003…):uint81–10, read/write + notify. - Brightness (
6e400004…):uint80–255, read/write + notify. - Option (
6e400005…):uint8effect-specific, read/write + notify. - Primary (
6e400006…): 3 bytes RGB, read/write + notify. - Secondary (
6e400007…): 3 bytes RGB, read/write + notify. - Timings (
6e40000b…): 4 bytes little-endian:fade_ms(u16),interval_ms(u16), read/write + notify. - Debug Mode (
6e400009…):uint80/1, read/write + notify; enabling sets effect to Debug. - Debug LED (
6e40000a…): 4 bytes:[index,u8][R][G][B], write + notify.
Notes
- Settings persist via Zephyr settings (NVS). The device re-advertises with the configured name.
- Web Bluetooth requires a user gesture for scanning; the chooser selects one device at a time.
This repository may include third-party modules managed by Zephyr/NCS. Refer to upstream module licenses as needed.