# Working with the LEDs

**URL:** <https://community.keyboard.io/t/working-with-the-leds/2698>\
**Category:** Uncategorized\
**Created:** [March 24, 2019, 5:55am UTC](https://community.keyboard.io/t/working-with-the-leds/2698 "2019-03-24T05:55:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lcuff](https://avatars.discourse-cdn.com/v4/letter/l/9dc877/32.png) [@lcuff](https://community.keyboard.io/u/lcuff)\
**Post date:** [March 24, 2019, 5:55am UTC](https://community.keyboard.io/t/working-with-the-leds/2698/1 "2019-03-24T05:55:15Z")

</div>

I’ve just now got the Arduino app installed and have successfully tweaked my keyboard layout. Yay! I’m now wanting to make it possible to turn the LEDS on to red with one key, and then turn them off with another key. (or make the LED key toggle between these two states.) I’m not sure how to proceed. I see all sorts of header files in the page inside the Arduino map, but I can’t find those header files. Do I need to do a git download? What’s the best (easiest) way to proceed?

---

<div class="post-metadata">

**Author:** ![lcuff](https://avatars.discourse-cdn.com/v4/letter/l/9dc877/32.png) [@lcuff](https://community.keyboard.io/u/lcuff)\
**Post date:** [March 24, 2019, 6:24pm UTC](https://community.keyboard.io/t/working-with-the-leds/2698/2 "2019-03-24T18:24:08Z")

</div>

I’ve been trying to help myself, and have made some progress, but could still use some help:

I found elsewhere on this site, a hint on how to set LED lights a particular color. It works to put

> solid.Red.activate()

at the end of Kaleidoscope.setup() , but when I try to define a macro to call it from  
a particular key, the compiler gives me an error message solidRed was not declared in this scope.

static void turnRed(uint8\_t key\_state) {  
solidRed.activate(); // gives ‘not declared in this scope’ message  
}

void setup() {  
// First, call Kaleidoscope’s internal setup function  
Kaleidoscope.setup();

Kaleidoscope.use(  
// The boot greeting effect pulses the LED button for 10 seconds after the keyboard is first connected  
&BootGreetingEffect,

```
// The hardware test mode, which can be invoked by tapping Prog, LED and the left Fn button at the same time.
&TestMode,

// LEDControl provides support for other LED modes
&LEDControl,

// We start with the LED effect that turns off all the LEDs.
&LEDOff,

... other stuff ...

// These static effects turn your keyboard's LEDs a variety of colors
&solidRed, &solidOrange, &solidYellow, &solidGreen, &solidBlue, &solidIndigo, &solidViolet,

... and more stuff 

solidRed.activate(); // works!

```

);

---

<div class="post-metadata">

**Author:** ![lcuff](https://avatars.discourse-cdn.com/v4/letter/l/9dc877/32.png) [@lcuff](https://community.keyboard.io/u/lcuff)\
**Post date:** [March 25, 2019, 3:41am UTC](https://community.keyboard.io/t/working-with-the-leds/2698/3 "2019-03-25T03:41:01Z")

</div>

And, after exploring a little more, I realized that the call solidRed.activate() can only be made AFTER the following declaration. Shazaam, it now works.

`static kaleidoscope::LEDSolidColor solidRed(160, 0, 0);`
