mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-02-27 01:56:43 +00:00
17 lines
82 KiB
JavaScript
17 lines
82 KiB
JavaScript
|
import { _ as _imports_0 } from "./chunks/color-wheel.DIUCmfNZ.js";
|
|||
|
import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.B9AX-CPi.js";
|
|||
|
const __pageData = JSON.parse('{"title":"RGB Lighting","description":"","frontmatter":{},"headers":[],"relativePath":"features/rgblight.md","filePath":"features/rgblight.md","lastUpdated":null}');
|
|||
|
const _sfc_main = { name: "features/rgblight.md" };
|
|||
|
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="rgb-lighting" tabindex="-1">RGB Lighting <a class="header-anchor" href="#rgb-lighting" aria-label="Permalink to "RGB Lighting""></a></h1><p>QMK has the ability to control RGB LEDs attached to your keyboard. This is commonly called <em>underglow</em>, due to the LEDs often being mounted on the bottom of the keyboard, producing a nice diffused effect when combined with a translucent case.</p><p><img src="https://raw.githubusercontent.com/qmk/qmk_firmware/3774a7fcdab5544fc787f4c200be05fcd417e31f/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg" alt="Planck with RGB Underglow"></p><p>Some keyboards come with RGB LEDs preinstalled. Others must have them installed after the fact. See the <a href="#hardware-modification">Hardware Modification</a> section for information on adding RGB lighting to your keyboard.</p><p>Currently QMK supports the following addressable LEDs:</p><ul><li>WS2811, WS2812, WS2812B, WS2812C, etc.</li><li>SK6812, SK6812MINI, SK6805</li><li>APA102</li></ul><p>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.</p><h2 id="usage" tabindex="-1">Usage <a class="header-anchor" href="#usage" aria-label="Permalink to "Usage""></a></h2><p>On keyboards with onboard RGB LEDs, it is usually enabled by default. If it is not working for you, check that your <code>rules.mk</code> includes the following:</p><div class="language-make vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">make</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">RGBLIGHT_ENABLE = yes</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>There are additional configuration options for ARM controllers that offer increased performance over the default WS2812 bitbang driver. Please see <a href="./../drivers/ws2812">WS2812 Driver</a> for more information.</p></div><p>For APA102 LEDs, add the following to your <code>rules.mk</code>:</p><div class="language-make vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">make</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">RGBLIGHT_ENABLE = yes</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">RGBLIGHT_DRIVER = apa102</span></span></code></pre></div><p>At minimum you must define the data pin your LED strip is connected to, and the number of LEDs in the strip, in your <code>config.h</code>. 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.</p><table><thead><tr><th>Define</th><th>Description</th></tr></thead><tbody><tr><td><code>WS2812_DI_PIN</code></td><td>The pin connected to the data pin of the LEDs (WS2812)</td></tr><tr><td><code>APA102_DI_PIN</code></td><td>The pin connected to the data pin of the LEDs (APA102)</td></tr><tr><td><code>APA102_CI_PIN</code></td><td>The pin connected to the clock pin of the LEDs (APA102)</td></tr><tr><td><code>RGBLIGHT_LED_COUNT</code></td><td>The number of LEDs connected</td></tr><tr><td><code>RGBLED_SPLIT</code></td><td>(Optional) For split keyboards, the number of LEDs connected on each half</td></tr></tbody></table><p>Then you should be able to use the keycodes below to change the RGB lighting to your liking.</p><h3 id="color-selection" tabindex="-1">Color Selection <a class="header-anchor" href="#color-selection" aria-label="Permalink to "Color Selection""></a></h3><p>QMK uses <a href="http
|
|||
|
const _hoisted_131 = [
|
|||
|
_hoisted_1
|
|||
|
];
|
|||
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
|
return openBlock(), createElementBlock("div", null, _hoisted_131);
|
|||
|
}
|
|||
|
const rgblight = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|||
|
export {
|
|||
|
__pageData,
|
|||
|
rgblight as default
|
|||
|
};
|