# LED Light Strip

**URL:** https://xrp.discourse.group/t/led-light-strip/426
**Category:** General
**Created:** [July 10, 2024, 2:31pm UTC](https://xrp.discourse.group/t/led-light-strip/426 "2024-07-10T14:31:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jajima](https://avatars.discourse-cdn.com/v4/letter/j/22d042/32.png) [@jajima](https://xrp.discourse.group/u/jajima)
#### Post date: [July 10, 2024, 2:31pm UTC](https://xrp.discourse.group/t/led-light-strip/426/1 "2024-07-10T14:31:30Z")

</div>

Looking to add an LED light strip using Servo 2 port. Trying to write code in MicroPython to light it up but can’t Google my way out of it. Anyone have starter code for LED strips on the XRP?

---

<div class="post-metadata">

### Author: ![SparkFro](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/sparkfro/32/12_2.png) [@SparkFro](https://xrp.discourse.group/u/SparkFro)
#### Post date: [July 10, 2024, 3:10pm UTC](https://xrp.discourse.group/t/led-light-strip/426/2 "2024-07-10T15:10:36Z")

</div>

MicroPython has support for NeoPixel LED strips (WS2812) built in: [neopixel — control of WS2812 / NeoPixel LEDs — MicroPython latest documentation](https://docs.micropython.org/en/latest/library/neopixel.html)

There’s also this tutorial written for the ESP8266, but I think should work on the XRP as well: [11. Controlling NeoPixels — MicroPython latest documentation](https://docs.micropython.org/en/latest/esp8266/tutorial/neopixel.html)

---

<div class="post-metadata">

### Author: ![WayneSeltzer](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/wayneseltzer/32/159_2.png) [@WayneSeltzer](https://xrp.discourse.group/u/WayneSeltzer)
#### Post date: [July 12, 2024, 6:24am UTC](https://xrp.discourse.group/t/led-light-strip/426/3 "2024-07-12T06:24:03Z")

</div>

It would useful to include the [MicroPython NeoPixel library](https://docs.micropython.org/en/latest/library/neopixel.html) in [XRPLib](https://github.com/Open-STEM/XRP_MicroPython) and the [XRP Code Editor](https://xrpcode.wpi.edu/).

Students really, really like to incorporate addressable LEDs in their projects.

---

<div class="post-metadata">

### Author: ![SparkFro](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/sparkfro/32/12_2.png) [@SparkFro](https://xrp.discourse.group/u/SparkFro)
#### Post date: [July 12, 2024, 3:38pm UTC](https://xrp.discourse.group/t/led-light-strip/426/4 "2024-07-12T15:38:46Z")

</div>

The XRP is already running MicroPython, so that NeoPixel library is already available and doesn’t need to be added anywhere else. To demonstrate, I took that example and copied it into XRPCode, changed the pin and number of LEDs, and it works just fine.

 ![image](https://canada1.discourse-cdn.com/flex011/uploads/xrp/original/1X/ab9d0f18448f2d45be24be183f1f0ddb05b9cf9e.png)

Although I suppose that Blockly users currently aren’t able to use the NeoPixel library. @Fgrossman would it be feasible to add blocks for LED strip control?

---

<div class="post-metadata">

### Author: ![Fgrossman](https://avatars.discourse-cdn.com/v4/letter/f/b77776/32.png) [@Fgrossman](https://xrp.discourse.group/u/Fgrossman)
#### Post date: [July 12, 2024, 4:02pm UTC](https://xrp.discourse.group/t/led-light-strip/426/5 "2024-07-12T16:02:06Z")

</div>

Great idea. We will look at it for a future release.
