Skip to content

Instantly share code, notes, and snippets.

@Canorus
Created October 13, 2020 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Canorus/c4180c90012b81d31a9b6d87042cd63a to your computer and use it in GitHub Desktop.
Save Canorus/c4180c90012b81d31a9b6d87042cd63a to your computer and use it in GitHub Desktop.
soflekeyboard LED
#pragma once
/* The way how "handedness" is decided (which half is which),
see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness
for more options.
*/
#define RGB_DI_PIN D3
#define RGBLED_NUM 5
#define RGBLED_SPLIT { 5, 0 }
#define RGBLIGHT_ANIMATIONS
OLED_DRIVER_ENABLE = yes
ENCODER_ENABLE = yes
CONSOLE_ENABLE = yes
EXTRAKEY_ENABLE = yes
RGBLIGHT_ENABLE = yes
SLEEP_LED_ENABLE = no
#include "sofle.h"
void eeconfig_init_kb(void) {
#ifdef RGBLIGHT_ENABLE
setPinOutput(D3);
writePinHigh(D3);
rgblight_enable(); // Enable RGB by default
rgblight_sethsv(255, 255, 255); // Set default HSV - red hue, full saturation, full brightness
#ifdef RGBLIGHT_ANIMATIONS
rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default
#endif
#endif
eeconfig_update_kb(0);
eeconfig_init_user();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment