2024-06-02 02:43:43 +00:00
|
|
|
|
import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.DyMmIvSC.js";
|
|
|
|
|
const __pageData = JSON.parse('{"title":"LED Matrix Lighting","description":"","frontmatter":{},"headers":[],"relativePath":"features/led_matrix.md","filePath":"features/led_matrix.md"}');
|
|
|
|
|
const _sfc_main = { name: "features/led_matrix.md" };
|
2024-06-12 00:51:54 +00:00
|
|
|
|
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="led-matrix-lighting" tabindex="-1">LED Matrix Lighting <a class="header-anchor" href="#led-matrix-lighting" aria-label="Permalink to "LED Matrix Lighting {#led-matrix-lighting}""></a></h1><p>This feature allows you to use LED matrices driven by external drivers. It hooks into the backlight system so you can use the same keycodes as backlighting to control it.</p><p>If you want to use RGB LED's you should use the <a href="./rgb_matrix">RGB 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 LED matrix lighting with the I2C IS31FL3731 LED 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;">LED_MATRIX_ENABLE = yes</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">LED_MATRIX_DRIVER = is31fl3731</span></span></code></pre></div><p>You can use between 1 and 4 IS31FL3731 IC's. Do not specify <code>LED_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>LED_MATRIX_LED_COUNT</code></td><td>(Required) How many LED 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 LED driver</td><td></td></tr><tr><td><code>IS31FL3731_I2C_ADDRESS_2</code></td><td>(Optional) Address for the second LED driver</td><td></td></tr><tr><td><code>IS31FL3731_I2C_ADDRESS_3</code></td><td>(Optional) Address for the third LED driver</td><td></td></tr><tr><td><code>IS31FL3731_I2C_ADDRESS_4</code></td><td>(Optional) Address for the fourth LED 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:#6A737D;">// ADDR represents A1:A0 of the 7-bit address.</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// The
|
|
|
|
|
const _hoisted_87 = [
|
2024-06-02 02:43:43 +00:00
|
|
|
|
_hoisted_1
|
|
|
|
|
];
|
|
|
|
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
2024-06-12 00:51:54 +00:00
|
|
|
|
return openBlock(), createElementBlock("div", null, _hoisted_87);
|
2024-06-02 02:43:43 +00:00
|
|
|
|
}
|
|
|
|
|
const led_matrix = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
|
|
|
export {
|
|
|
|
|
__pageData,
|
|
|
|
|
led_matrix as default
|
|
|
|
|
};
|