Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handwired macropad 4x4 illera16 #22226

Closed
wants to merge 10 commits into from
39 changes: 39 additions & 0 deletions keyboards/handwired/illera16/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright 2023 y (@villeramassana)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/

/* disable debug print */
//#define NO_DEBUG

/* disable print */
//#define NO_PRINT

/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//Vial

#define VIAL_KEYBOARD_UID {0xFD, 0XC4, 0xE0, 0x12, 0x93, 0x1C, 0x2B, 0x9A}
#define VIAL_UNLOCK_COMBO_ROWS { 0,0 }
#define VIAL_UNLOCK_COMBO_COLS { 0,1 }

#define WS2812_DI_PIN D0
#define RGBLED_NUM 6
#define RGBLIGHT_LAYERS

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5

#define ENCODERS_PAD_A { B5, B4}
#define ENCODERS_PAD_B { B6, B2}
#define ENCODER_RESOLUTION 2

#define MIDI_BASIC

48 changes: 48 additions & 0 deletions keyboards/handwired/illera16/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"manufacturer": "victor_illera",
"keyboard_name": "illera16",
"maintainer": "villeramassana",
"bootloader": "caterina",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"bootloader": "caterina",

"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true
villeramassana marked this conversation as resolved.
Show resolved Hide resolved
},
"matrix_pins": {
"cols": ["D4", "C6", "D7", "E6"],
"rows": ["F4", "F5", "F6", "F7"]
},
"processor": "atmega32u4",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"processor": "atmega32u4",
"development_board": "promicro",

"url": "",
"usb": {
"device_version": "1.0.0",
"pid": "0x0000",
"vid": "0xFEED"
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
},
},
"community_layouts": ["ortho_4x4"],

"layouts": {
"LAYOUT_ortho_4x4": {
"layout": [
{ "matrix": [0, 0], "x": 0, "y": 0 },
{ "matrix": [0, 1], "x": 1, "y": 0 },
{ "matrix": [0, 2], "x": 2, "y": 0 },
{ "matrix": [0, 3], "x": 3, "y": 0 },
{ "matrix": [1, 0], "x": 0, "y": 1 },
{ "matrix": [1, 1], "x": 1, "y": 1 },
{ "matrix": [1, 2], "x": 2, "y": 1 },
{ "matrix": [1, 3], "x": 3, "y": 1 },
{ "matrix": [2, 0], "x": 0, "y": 2 },
{ "matrix": [2, 1], "x": 1, "y": 2 },
{ "matrix": [2, 2], "x": 2, "y": 2 },
{ "matrix": [2, 3], "x": 3, "y": 2 },
{ "matrix": [3, 0], "x": 0, "y": 3 },
{ "matrix": [3, 1], "x": 1, "y": 3 },
{ "matrix": [3, 2], "x": 2, "y": 3 },
{ "matrix": [3, 3], "x": 3, "y": 3 }
]
}
}
}
97 changes: 97 additions & 0 deletions keyboards/handwired/illera16/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// Copyright 2023 QMK
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

#define _BASE 0
#define _CAPA1 1
#define _CAPA2 2
#define _CAPA3 3

layer_state_t layer_state_set_user(layer_state_t state);

void keyboard_post_init_user(void) {
rgblight_enable_noeeprom();
layer_state_set_user(layer_state);
}

layer_state_t layer_state_set_user(layer_state_t state) {
uint8_t layer = biton32(state);
switch (layer) {
case _CAPA1:
rgblight_sethsv_noeeprom(HSV_GREEN);
break;

case _CAPA2:
rgblight_sethsv_noeeprom(HSV_RED);
break;

case _CAPA3:
rgblight_sethsv_noeeprom(HSV_PINK);
break;

default:
rgblight_sethsv_noeeprom(HSV_BLUE); // MI COLOR
break;
}

return state;
}


const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* ┌───┬───┬───┬───┐
* │ 7 │c1 │ 9 │ / │
* ├───┼───┼───┼───┤
* │ 7 │ 8 │ 9 │ * │
* ├───┼───┼───┼───┤
* │ 4 │ 5 │ 6 │ - │
* ├───┼───┼───┼───┤
* │ 1 │ 2 │ 3 │ 0 │
* └───┴───┴───┴───┘
*/

[0] = LAYOUT_ortho_4x4( /* CAPAS BASE */
KC_DEL, TG(1), _______, KC_SLASH,
KC_7, KC_8, KC_9, KC_PAST,
KC_4, KC_5, KC_6, KC_PMNS,
KC_1, KC_2, KC_3, KC_0
),
[1] = LAYOUT_ortho_4x4( /* CAPA1 */
KC_1, TG(2), TG(1), KC_1,
KC_1, KC_1, KC_1, KC_1,
KC_1, KC_1, KC_1, KC_1,
KC_1, KC_1, KC_1, KC_1
),
[2] = LAYOUT_ortho_4x4( /* CAPA2 */
KC_2, TG(3), TG(2), KC_2,
KC_2, KC_2, KC_2, KC_2,
KC_2, KC_2, KC_2, KC_2,
KC_2, KC_2, KC_2, KC_2
),
[3] = LAYOUT_ortho_4x4( /* CAPA3 */
KC_3, KC_NO, TG(3), KC_3,
KC_3, KC_3, KC_3, KC_3,
KC_3, KC_3, KC_3, KC_3,
KC_3, KC_3, KC_3, KC_3
),


};
/*
* ROTARY ENCODER
*/

#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) },
[1] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) },
[2] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) },
[3] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) },
};

#endif



25 changes: 25 additions & 0 deletions keyboards/handwired/illera16/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# handwired/illera16

*hand wired 4x4 macro pad*

* Keyboard Maintainer: [victor_illera](https://github.com/villeramassana)
* Hardware Supported: *Pro Micro*
* Hardware Availability: *Aliexpress or Amazon*

Make example for this keyboard (after setting up your build environment):

make handwired/illera16:default

Flashing example for this keyboard:

make handwired/illera16:default:flash

See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

## Bootloader

Enter the bootloader in 3 ways:

* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
5 changes: 5 additions & 0 deletions keyboards/handwired/illera16/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file intentionally left blank

RGBLIGHT_ENABLE = yes
ENCODER_ENABLE = yes
ENCODER_MAP_ENABLE = yes