aboutsummaryrefslogtreecommitdiff
path: root/docs/feature_rgblight.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/feature_rgblight.md')
-rw-r--r--docs/feature_rgblight.md36
1 files changed, 25 insertions, 11 deletions
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index 755fd769e..d2612a6d1 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -10,6 +10,7 @@ Currently QMK supports the following addressable LEDs (however, the white LED in
10 10
11 * WS2811, WS2812, WS2812B, WS2812C, etc. 11 * WS2811, WS2812, WS2812B, WS2812C, etc.
12 * SK6812, SK6812MINI, SK6805 12 * SK6812, SK6812MINI, SK6805
13 * APA102
13 14
14These 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. 15These 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.
15 16
@@ -21,11 +22,19 @@ On keyboards with onboard RGB LEDs, it is usually enabled by default. If it is n
21RGBLIGHT_ENABLE = yes 22RGBLIGHT_ENABLE = yes
22``` 23```
23 24
24At 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. 25For APA102 LEDs, add the following to your `rules.mk`:
26
27```make
28RGBLIGHT_ENABLE = yes
29RGBLIGHT_DRIVER = APA102
30```
31
32At 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`. For APA102 LEDs, you must also define the clock pin. If your keyboard has onboard RGB LEDs, and you are simply creating a keymap, you usually won't need to modify these.
25 33
26|Define |Description | 34|Define |Description |
27|---------------|---------------------------------------------------------------------------------------------------------| 35|---------------|---------------------------------------------------------------------------------------------------------|
28|`RGB_DI_PIN` |The pin connected to the data pin of the LEDs | 36|`RGB_DI_PIN` |The pin connected to the data pin of the LEDs |
37|`RGB_CI_PIN` |The pin connected to the clock pin of the LEDs (APA102 only) |
29|`RGBLED_NUM` |The number of LEDs connected | 38|`RGBLED_NUM` |The number of LEDs connected |
30|`RGBLED_SPLIT` |(Optional) For split keyboards, the number of LEDs connected on each half directly wired to `RGB_DI_PIN` | 39|`RGBLED_SPLIT` |(Optional) For split keyboards, the number of LEDs connected on each half directly wired to `RGB_DI_PIN` |
31 40
@@ -73,15 +82,20 @@ Changing the **Value** sets the overall brightness.<br>
73 82
74Your RGB lighting can be configured by placing these `#define`s in your `config.h`: 83Your RGB lighting can be configured by placing these `#define`s in your `config.h`:
75 84
76|Define |Default |Description | 85|Define |Default |Description |
77|---------------------|-------------|-----------------------------------------------------------------------------| 86|---------------------------|----------------------------|---------------------------------------------------------------------------------------------------------------------------|
78|`RGBLIGHT_HUE_STEP` |`10` |The number of steps to cycle through the hue by | 87|`RGBLIGHT_HUE_STEP` |`10` |The number of steps to cycle through the hue by |
79|`RGBLIGHT_SAT_STEP` |`17` |The number of steps to increment the saturation by | 88|`RGBLIGHT_SAT_STEP` |`17` |The number of steps to increment the saturation by |
80|`RGBLIGHT_VAL_STEP` |`17` |The number of steps to increment the brightness by | 89|`RGBLIGHT_VAL_STEP` |`17` |The number of steps to increment the brightness by |
81|`RGBLIGHT_LIMIT_VAL` |`255` |The maximum brightness level | 90|`RGBLIGHT_LIMIT_VAL` |`255` |The maximum brightness level |
82|`RGBLIGHT_SLEEP` |*Not defined*|If defined, the RGB lighting will be switched off when the host goes to sleep| 91|`RGBLIGHT_SLEEP` |*Not defined* |If defined, the RGB lighting will be switched off when the host goes to sleep |
83|`RGBLIGHT_SPLIT` |*Not defined*|If defined, synchronization functionality for split keyboards is added| 92|`RGBLIGHT_SPLIT` |*Not defined* |If defined, synchronization functionality for split keyboards is added |
84|`RGBLIGHT_DISABLE_KEYCODES`|*not defined*|If defined, disables the ability to control RGB Light from the keycodes. You must use code functions to control the feature| 93|`RGBLIGHT_DISABLE_KEYCODES`|*Not defined* |If defined, disables the ability to control RGB Light from the keycodes. You must use code functions to control the feature|
94|`RGBLIGHT_DEFAULT_MODE` |`RGBLIGHT_MODE_STATIC_LIGHT`|The default mode to use upon clearing the EEPROM |
95|`RGBLIGHT_DEFAULT_HUE` |`0` (red) |The default hue to use upon clearing the EEPROM |
96|`RGBLIGHT_DEFAULT_SAT` |`UINT8_MAX` (255) |The default saturation to use upon clearing the EEPROM |
97|`RGBLIGHT_DEFAULT_VAL` |`RGBLIGHT_LIMIT_VAL` |The default value (brightness) to use upon clearing the EEPROM |
98|`RGBLIGHT_DEFAULT_SPD` |`0` |The default speed to use upon clearing the EEPROM |
85 99
86## Effects and Animations 100## Effects and Animations
87 101
@@ -139,7 +153,7 @@ The following options are used to tweak the various animations:
139|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by | 153|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
140|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls | 154|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls |
141|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation | 155|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
142|`RGBLIGHT_EFFECT_TWINKLE_LIFE` |`75` |Adjusts how quickly each LED brightens and dims when twinkling (in animation steps) | 156|`RGBLIGHT_EFFECT_TWINKLE_LIFE` |`200` |Adjusts how quickly each LED brightens and dims when twinkling (in animation steps) |
143|`RGBLIGHT_EFFECT_TWINKLE_PROBABILITY`|`1/127` |Adjusts how likely each LED is to twinkle (on each animation step) | 157|`RGBLIGHT_EFFECT_TWINKLE_PROBABILITY`|`1/127` |Adjusts how likely each LED is to twinkle (on each animation step) |
144 158
145### Example Usage to Reduce Memory Footprint 159### Example Usage to Reduce Memory Footprint