Particle Christmas Tree - More LED Animations?

Picture is from @nrobinson2000

I received Particles really cool Wifi Christmas Tree Ornament last week and we really love it!

Thanks, @mohit @will @zachary @zach @BDub @Dave and whole rest of the :spark: Team :slight_smile:

I’ve figured out how to add more music to it but adding more Dotstar LED animations is taking more time as I learn how to swap Neopixel code to control the Dotstars.

I found some other LED patterns being used on this Christmas tree on the web and was hoping maybe that code was available somewhere to be used with the tree also?

The Dotstar LED’s are small but still super bright and colorful. Never seen 2020 Dotstar’s before but these are impressive!

If you don’t have your Particle Christmas Tree Ornament you can pick them up here:

https://store.particle.io/products/holiday-tree-pcb

10 Likes

DotStar (aka AP102) protocol is simple. You can have a look here

1 Like

Check this PR for how to add a new animation and this PR for how to add a new song.

4 Likes

@jvanier Just loaded your new Tree Code and where you added the Redgreen amination the green shows up Blue.

I changed the RGB value to what you see below and now the LED’s show RED and Green vs RED and Blue.

void redGreen(uint8_t wait)
{
    uint16_t j = 0;
    while(true) {

        if (changeAnimation)
            return;

        for (uint16_t i = 0; i < leds.numPixels(); i++) {
            leds.setPixelColor(i, (i + j) % 3 == 0 ? leds.Color(255,0,0) : leds.Color(0,0,255));
        }
        j = (j + 1) % 3;

        leds.show();
        delayAnimation(wait);
    }
}

There’s another line in the PR to fix the color ordering :grin:

Adafruit_DotStar leds = Adafruit_DotStar(TOTAL_LED, PIN_LED_DATA, PIN_LED_CLOCK, DOTSTAR_BGR);