Controllering the on–board power LED
Like most controllers, the Liatris features a power LED. After all, it is quite nice to know whether your keyboard is actually turning on.
However, many people do not want to have a bright light shining in their face the entire time they are using their keyboard. The traditional solution is to destroy the LED by poking it with a soldering iron, or to mount the controller upside-down.
At splitkb.com, we decided to go for a different solution. The Liatris is intended to be mounted upside-down as usual, but we decided to place the power LED on the back and make it user-controllable by hooking it up to microcontroller pin GPIO24!
To get you started, here are some examples of common uses.
Turning the power LED off
By default, the power LED will be turned on all the time. If you wish to turn it off completely, place the following code in your keymap.c
:
#include "gpio.h"
void keyboard_pre_init_user(void) {
gpio_set_pin_output(24);
gpio_write_pin_high(24);
}
When the keyboard is plugged in, the LED will initially power on. As soon as QMK starts running, it'll be turned off.
Use the LED for Caps Lock
To use the LED as a Caps Lock indicator, add the following code to your config.h
:
#define LED_CAPS_LOCK_PIN 24
#define LED_PIN_ON_STATE 0
Of course, this approach also works for Num Lock or Scroll Lock. For more information, see the QMK documentation of this feature.
Pinout diagram
See which pins offer what functionality for the Liatris controller.
On-board RGB
Use the Liatris' RGB LED to display your keyboard's status and other state changes.