Skip to content

Instantly share code, notes, and snippets.

@sekigon-gonnoc
sekigon-gonnoc / config.h
Last active September 23, 2022 04:02
VIA LED configuration per layer, with RGB_MATRIX
// VIA config
#define VIA_CUSTOM_LIGHTING_ENABLE
#define VIA_RGBLIGHT_USER_ADDR (EECONFIG_SIZE)
#define VIA_EEPROM_MAGIC_ADDR (VIA_RGBLIGHT_USER_ADDR + DYNAMIC_KEYMAP_LAYER_COUNT * 4) // Layer * 4bytes(RGB Light config)
@sekigon-gonnoc
sekigon-gonnoc / converter.py
Last active June 16, 2023 08:05
Bad Apple!! on OLED
import cv2
import numpy as np
import math
WIDTH=32
HEIGHT=24
def frame2array(frame):
img = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
img = cv2.resize(img, (WIDTH,HEIGHT))
{"config":
{
"version":2,
"device_info":{"vid":"0xFEED","pid":"0x0000",
"name":"otaku_split","manufacture":"takashiski","description":"A custom keyboard"},
"matrix":{"rows":10,"cols":8,"device_rows":5, "device_cols":8,
"debounce":1,"is_left_hand":1,"diode_direction":0,
"row_pins":[8, 9, 10, 11, 12],
"col_pins":[20, 19, 18, 17, 16, 15, 14, 13],
"layout":[1, 2, 3, 4, 5, 6, 7, 41, 42, 43, 44, 45, 46, 47, 48, 56, 0,
/*
Copyright 2018 Sekigon
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of