# Set LED colours from external source

**URL:** <https://community.keyboard.io/t/set-led-colours-from-external-source/1751>\
**Category:** Programming\
**Created:** [July 9, 2018, 5:06pm UTC](https://community.keyboard.io/t/set-led-colours-from-external-source/1751 "2018-07-09T17:06:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![agenticarus](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/agenticarus/32/2060_2.png) [@agenticarus](https://community.keyboard.io/u/agenticarus)\
**Post date:** [July 9, 2018, 5:06pm UTC](https://community.keyboard.io/t/set-led-colours-from-external-source/1751/1 "2018-07-09T17:06:15Z")

</div>

I’ve had a look through the topics and the wiki but couldn’t see if this is possible - I’d like to set the colour of my LED backlights from (e.g.) a command run on my computer. Has anyone else done this?

---

<div class="post-metadata">

**Author:** ![fishheadsoup](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/fishheadsoup/32/161_2.png) [@fishheadsoup](https://community.keyboard.io/u/fishheadsoup)\
**Post date:** [July 9, 2018, 5:57pm UTC](https://community.keyboard.io/t/set-led-colours-from-external-source/1751/2 "2018-07-09T17:57:44Z")

</div>

That would be cool…

---

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [July 9, 2018, 6:36pm UTC](https://community.keyboard.io/t/set-led-colours-from-external-source/1751/3 "2018-07-09T18:36:09Z")

</div>

> [@agenticarus](#):
>
> I’d like to set the colour of my LED backlights from (e.g.) a command run on my computer

This is _exactly_ what the [Focus](https://github.com/keyboardio/Kaleidoscope-Focus) plugin was made for!

> [@agenticarus](#):
>
> Has anyone else done this?

[https://asylum.madhouse-project.org/assets/asylum/images/posts/keyboard-firmware-work/2017-08-01/kaleidoscope.el-demo.webm](https://asylum.madhouse-project.org/assets/asylum/images/posts/keyboard-firmware-work/2017-08-01/kaleidoscope.el-demo.webm)

Yep. Above, you can see the [kaleidoscope.el](https://github.com/algernon/kaleidoscope.el) Emacs package in action, setting the LED colors to the color of the current Evil state (normal/insert/selection/overwrite/etc).

So yep, this is not only possible, but it’s been done before. If you need help interfacing your tool with Focus, feel free to ask away!

---

<div class="post-metadata">

**Author:** ![agenticarus](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/agenticarus/32/2060_2.png) [@agenticarus](https://community.keyboard.io/u/agenticarus)\
**Post date:** [July 9, 2018, 6:44pm UTC](https://community.keyboard.io/t/set-led-colours-from-external-source/1751/4 "2018-07-09T18:44:18Z")

</div>

Thank you! Hopefully I can get a handle on that, but if not, I’ll be back!

---

<div class="post-metadata">

**Author:** ![jesse](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/jesse/32/361_2.png) [@jesse](https://community.keyboard.io/u/jesse)\
**Post date:** [July 10, 2018, 5:10pm UTC](https://community.keyboard.io/t/set-led-colours-from-external-source/1751/5 "2018-07-10T17:10:27Z")

</div>

Longer term, there will be a USB standard for this stuff. Right now, it’s just a draft, but this is where we’re headed:

> **[HUTRR84\_-\_Lighting\_and\_Illumination\_Page.pdf](https://www.usb.org/developers/hidpage/HUTRR84_-_Lighting_and_Illumination_Page.pdf)**

---

<div class="post-metadata">

**Author:** ![fche](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/fche/32/380_2.png) [@fche](https://community.keyboard.io/u/fche)\
**Post date:** [July 12, 2018, 3:37pm UTC](https://community.keyboard.io/t/set-led-colours-from-external-source/1751/6 "2018-07-12T15:37:21Z")

</div>

My usage scenario for this widget would be to associate my x bell event with a persistent flashing indication on the keyboard, until a specific key (prog?) is hit. Kind of like a master alarm on an industrial control panel.

---

<div class="post-metadata">

**Author:** ![agenticarus](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/agenticarus/32/2060_2.png) [@agenticarus](https://community.keyboard.io/u/agenticarus)\
**Post date:** [July 16, 2018, 10:36am UTC](https://community.keyboard.io/t/set-led-colours-from-external-source/1751/7 "2018-07-16T10:36:00Z")

</div>

> if not, I’ll be back!

Well, I’m back!

I’ve successfully got Arduino IDE setup but the version of Kaleidoscope I downloaded using the boardmanager (v1.23) doesn’t seem to support `KALEIDOSCOPE_INIT_PLUGINS` (which I copied and pasted from the `Focus` example).

Should I wait for the v2 release?

---

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [July 16, 2018, 10:43am UTC](https://community.keyboard.io/t/set-led-colours-from-external-source/1751/8 "2018-07-16T10:43:02Z")

</div>

> [@agenticarus](#):
>
> Should I wait for the v2 release?

You can use a git checkout of [Arduino-Boards](https://github.com/keyboardio/Arduino-Boards) instead, and get the latest & greatest firmware and plugins. If you are comfortable with git, I’d go that route.

---

<div class="post-metadata">

**Author:** ![agenticarus](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/agenticarus/32/2060_2.png) [@agenticarus](https://community.keyboard.io/u/agenticarus)\
**Post date:** [July 16, 2018, 12:36pm UTC](https://community.keyboard.io/t/set-led-colours-from-external-source/1751/9 "2018-07-16T12:36:40Z")

</div>

Progress!

 ![keyboardio_focus](https://canada1.discourse-cdn.com/flex031/uploads/keyboard/original/2X/d/da521784961a3f8c73a92410dfa10936a229e810.png)

---

<div class="post-metadata">

**Author:** ![agenticarus](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/agenticarus/32/2060_2.png) [@agenticarus](https://community.keyboard.io/u/agenticarus)\
**Post date:** [July 16, 2018, 3:35pm UTC](https://community.keyboard.io/t/set-led-colours-from-external-source/1751/10 "2018-07-16T15:35:10Z")

</div>

Yesssss it works! Thanks for the pointer to the git instructions. I’ve got the left and the right halves updating independently based on environment variables as part of my shell prompt - hurrrah!
