From d8e6ada5d70a4db9b7bffe591923f1368a0131f1 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 8 Aug 2018 02:07:19 +1000 Subject: [PATCH] Improve RGB lighting documentation (#3580) --- docs/feature_rgblight.md | 241 ++++++++++++++++++--------------------- 1 file changed, 114 insertions(+), 127 deletions(-) diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index e0918d11bd..d48941a04f 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -1,131 +1,46 @@ # RGB Lighting -If you've installed addressable RGB lights on your keyboard you can control them with QMK. Currently we support the following addressable LEDs on Atmel AVR processors: +QMK has the ability to control RGB LEDs attached to your keyboard. This is commonly called *underglow*, due to the LEDs often being mounted on the bottom of the keyboard, producing a nice diffused effect when combined with a translucent case. -* WS2811 and variants (WS2812, WS2812B, WS2812C, etc) -* SK6812RGBW +![Planck with RGB Underglow](https://raw.githubusercontent.com/qmk/qmk_firmware/3774a7fcdab5544fc787f4c200be05fcd417e31f/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg) -Some keyboards come with RGB LEDs pre-installed. Others have to have LEDs installed after the fact. See below for information on modifying your keyboard. +Some keyboards come with RGB LEDs preinstalled. Others must have them installed after the fact. See the [Hardware Modification](#hardware-modification) section for information on adding RGB lighting to your keyboard. -## Selecting Colors +Currently QMK supports the following addressable LEDs on AVR microcontrollers (however, the white LED in RGBW variants is not supported): -QMK uses Hue, Saturation, and Value to set color rather than using RGB. You can use the color wheel below to see how this works. Changing the Hue will cycle around the circle. Saturation will affect the intensity of the color, which you can see as you move from the inner part to the outer part of the wheel. Value sets the overall brightness. + * WS2811, WS2812, WS2812B, WS2812C, etc. + * SK6812, SK6812MINI, SK6805 -HSV Color Wheel +These LEDs are called "addressable" because instead of using a wire per color, each LED contains a small microchip that understands a special protocol sent over a single wire. The chip passes on the remaining data to the next LED, allowing them to be chained together. In this way, you can easily control the color of the individual LEDs. -If you would like to learn more about HSV you can start with the [Wikipedia article](https://en.wikipedia.org/wiki/HSL_and_HSV). +## Usage -## Configuration +On keyboards with onboard RGB LEDs, it is usually enabled by default. If it is not working for you, check that your `rules.mk` includes the following: -Before RGB Lighting can be used you have to enable it in `rules.mk`: - - RGBLIGHT_ENABLE = yes - -You can configure the behavior of the RGB lighting by defining values inside `config.h`. - -### Required Configuration - -At minimum you have to define the pin your LED strip is connected to and the number of LEDs connected. - -```c -#define RGB_DI_PIN D7 // The pin the LED strip is connected to -#define RGBLED_NUM 14 // Number of LEDs in your strip +```make +RGBLIGHT_ENABLE = yes ``` -### Optional Configuration +At minimum you must define the data pin your LED strip is connected to, and the number of LEDs in the strip, in your `config.h`. If your keyboard has onboard RGB LEDs, and you are simply creating a keymap, you usually won't need to modify these. -You can change the behavior of the RGB Lighting by setting these configuration values. Use `#define