# Particle Christmas Tree - More LED Animations?

**URL:** <https://community.particle.io/t/particle-christmas-tree-more-led-animations/38147>\
**Category:** General\
**Created:** [December 16, 2017, 10:24pm UTC](https://community.particle.io/t/particle-christmas-tree-more-led-animations/38147 "2017-12-16T22:24:59Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [December 17, 2017, 7:04am UTC](https://community.particle.io/t/particle-christmas-tree-more-led-animations/38147/2 "2017-12-17T07:04:41Z")

</div>

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

> [@When I connect chain of LED strips to power from both ends, do I need to make the power line disconnect in the middle?](https://community.particle.io/t/when-i-connect-chain-of-led-strips-to-power-from-both-ends-do-i-need-to-make-the-power-line-disconnect-in-the-middle/35555/41):
>
> And that does nothing else then combining the RGB components into on 32bit number and placing that integer in a pixel buffer at position px. Just like this #define LEDCOUNT 300 uint32\_t pxBuffer[LEDCOUNT]; // actually for the APA102 protocoll you need some extra bytes for leadin/leadout //uint32\_t pxBuffer[1 + LEDCOUNT + LEDCOUNT/16 + 1]; // element 0 (leadin) ... LEDs ... 1 leadout clock per 2 LEDs (ceil) bool needRefresh; volatile bool canRefresh = true; uint32\_t setAPA102Color(int px, ui…

---

_[View the full topic](https://community.particle.io/t/particle-christmas-tree-more-led-animations/38147)._
