You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Kaleidoscope/plugins/Kaleidoscope-LED-ActiveLaye...
Michael Richters fd98ea2207
Rearrange plugin headers with `include-what-you-use`
3 years ago
..
src Rearrange plugin headers with `include-what-you-use` 3 years ago
README.md Cleanups for typos and broken links across the documentation 4 years ago
library.properties More library tweaking to comply with arduino requirements 4 years ago

README.md

LED-ActiveLayerColor

A simple way to light up the keyboard in uniform colors, depending on what layer one's on. Unlike Colormap, all keys will be the same color. But this plugin uses considerably less resources, and is easier to set up as well. A perfect solution when one wants to quickly see what layer they're on, with minimal resources and time investment.

Using the plugin

To use the plugin, one needs to include the header, and activate the effect. Then, one needs to configure a color map:

#include <Kaleidoscope.h>
#include <Kaleidoscope-LEDControl.h>
#include <Kaleidoscope-LED-ActiveLayerColor.h>

KALEIDOSCOPE_INIT_PLUGINS(LEDControl,
                          LEDActiveLayerColorEffect);

void setup () {
  static const cRGB layerColormap[] PROGMEM = {
    CRGB(128, 0, 0),
    CRGB(0, 128, 0)
  };

  Kaleidoscope.setup();
  LEDActiveLayerColorEffect.setColormap(layerColormap);
}

Plugin properties

The plugin provides the LEDActiveLayerColorEffect object, which has the following method:

.setColormap(colormap)

Sets the colormap to the supplied map. Each element of the map should be a cRGB color, and the array must have the same amount of items as there are layers. The map should reside in PROGMEM.

Dependencies

Further reading

Starting from the example is the recommended way of getting started with the plugin.