mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-02-27 01:56:43 +00:00
16 lines
164 KiB
JavaScript
16 lines
164 KiB
JavaScript
|
import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.DyMmIvSC.js";
|
|||
|
const __pageData = JSON.parse('{"title":"RGB Matrix Lighting","description":"","frontmatter":{},"headers":[],"relativePath":"features/rgb_matrix.md","filePath":"features/rgb_matrix.md"}');
|
|||
|
const _sfc_main = { name: "features/rgb_matrix.md" };
|
|||
|
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="rgb-matrix-lighting" tabindex="-1">RGB Matrix Lighting <a class="header-anchor" href="#rgb-matrix-lighting" aria-label="Permalink to "RGB Matrix Lighting {#rgb-matrix-lighting}""></a></h1><p>This feature allows you to use RGB LED matrices driven by external drivers. It hooks into the RGBLIGHT system so you can use the same keycodes as RGBLIGHT to control it.</p><p>If you want to use single color LED's you should use the <a href="./led_matrix">LED Matrix Subsystem</a> instead.</p><h2 id="driver-configuration" tabindex="-1">Driver configuration <a class="header-anchor" href="#driver-configuration" aria-label="Permalink to "Driver configuration {#driver-configuration}""></a></h2><hr><h3 id="is31fl3731" tabindex="-1">IS31FL3731 <a class="header-anchor" href="#is31fl3731" aria-label="Permalink to "IS31FL3731 {#is31fl3731}""></a></h3><p>There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this 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;">RGB_MATRIX_ENABLE = yes</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">RGB_MATRIX_DRIVER = is31fl3731</span></span></code></pre></div><p>You can use between 1 and 4 IS31FL3731 IC's. Do not specify <code>DRIVER_ADDR_<N></code> defines for IC's that are not present on your keyboard. You can define the following items in <code>config.h</code>:</p><table><thead><tr><th>Variable</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>IS31FL3731_I2C_TIMEOUT</code></td><td>(Optional) How long to wait for i2c messages, in milliseconds</td><td>100</td></tr><tr><td><code>IS31FL3731_I2C_PERSISTENCE</code></td><td>(Optional) Retry failed messages this many times</td><td>0</td></tr><tr><td><code>IS31FL3731_DEGHOST</code></td><td>(Optional) Set this define to enable de-ghosting by halving Vcc during blanking time</td><td></td></tr><tr><td><code>RGB_MATRIX_LED_COUNT</code></td><td>(Required) How many RGB lights are present across all drivers</td><td></td></tr><tr><td><code>IS31FL3731_I2C_ADDRESS_1</code></td><td>(Required) Address for the first RGB driver</td><td></td></tr><tr><td><code>IS31FL3731_I2C_ADDRESS_2</code></td><td>(Optional) Address for the second RGB driver</td><td></td></tr><tr><td><code>IS31FL3731_I2C_ADDRESS_3</code></td><td>(Optional) Address for the third RGB driver</td><td></td></tr><tr><td><code>IS31FL3731_I2C_ADDRESS_4</code></td><td>(Optional) Address for the fourth RGB driver</td><td></td></tr></tbody></table><p>Here is an example using 2 drivers.</p><div class="language-c vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">c</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// This is a 7-bit address, that gets left-shifted and bit 0</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// set to 0 for write, 1 for read (as per I2C protocol)</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// The address will vary depending on your wiring:</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 00 AD <-> GND</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 01 AD <-> SCL</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 10 AD <-> SDA</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 11 AD <-> VCC</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#
|
|||
|
const _hoisted_200 = [
|
|||
|
_hoisted_1
|
|||
|
];
|
|||
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
|
return openBlock(), createElementBlock("div", null, _hoisted_200);
|
|||
|
}
|
|||
|
const rgb_matrix = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|||
|
export {
|
|||
|
__pageData,
|
|||
|
rgb_matrix as default
|
|||
|
};
|