From 25033d5d9ee1298c719d8e33a96eb7cabb9c04ac Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 3 Jul 2022 00:08:05 +1000 Subject: MSYS2 install: use MinGW python-qmk package (#17302) * MSYS2 install: use MinGW python-qmk package * Add missing flashers * Note VC Redist for manual install * VC Redist no longer needed --- docs/newbs_getting_started.md | 10 ++-------- util/install/msys2.sh | 13 +++++-------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md index d5f92cf89d..55a50f7b3c 100644 --- a/docs/newbs_getting_started.md +++ b/docs/newbs_getting_started.md @@ -36,21 +36,15 @@ Alternatively, if you'd like to manually install MSYS2, the following section wi #### Prerequisites -You will need to install MSYS2, Git and Python. Follow the installation instructions on https://www.msys2.org. - -Once MSYS2 is installed, close any open MSYS terminals and open a new MinGW 64-bit terminal. +You will need to install [MSYS2](https://www.msys2.org). Once installed, close any open MSYS terminals (purple icon) and open a new MinGW 64-bit terminal (blue icon) from the Start Menu. !> **NOTE:** The MinGW 64-bit terminal is *not* the same as the MSYS terminal that opens when installation is completed. Your prompt should say "MINGW64" in purple text, rather than "MSYS". See [this page](https://www.msys2.org/wiki/MSYS2-introduction/#subsystems) for more information on the differences. -Then run the following command: - - pacman --needed --noconfirm --disable-download-timeout -S git mingw-w64-x86_64-toolchain mingw-w64-x86_64-python3-pip mingw-w64-x86_64-python-pillow - #### Installation Install the QMK CLI by running: - python3 -m pip install qmk + pacman --needed --noconfirm --disable-download-timeout -S git mingw-w64-x86_64-python-qmk diff --git a/util/install/msys2.sh b/util/install/msys2.sh index c57c455eb4..fa422023ab 100755 --- a/util/install/msys2.sh +++ b/util/install/msys2.sh @@ -7,17 +7,14 @@ _qmk_install_prepare() { _qmk_install() { echo "Installing dependencies" - pacman --needed --noconfirm --disable-download-timeout -S pactoys-git + pacman --needed --noconfirm --disable-download-timeout -S pactoys pacboy sync --needed --noconfirm --disable-download-timeout \ - base-devel: toolchain:x clang:x git: unzip: python3-pip:x \ - avr-binutils:x avr-gcc:x avr-libc:x arm-none-eabi-binutils:x \ - arm-none-eabi-gcc:x arm-none-eabi-newlib:x avrdude:x bootloadhid:x \ - dfu-programmer:x dfu-util:x teensy-loader-cli:x hidapi:x \ - python-appdirs:x python-colorama:x python-jsonschema:x python-pillow:x python-pygments:x + base-devel: toolchain:x clang:x python-qmk:x hidapi:x \ + avr-binutils:x avr-gcc:x avr-libc:x \ + arm-none-eabi-binutils:x arm-none-eabi-gcc:x arm-none-eabi-newlib:x \ + avrdude:x bootloadhid:x dfu-programmer:x dfu-util:x hid-bootloader-cli:x mdloader:x teensy-loader-cli:x wb32-dfu-updater:x _qmk_install_drivers - - python3 -m pip install -r "$QMK_FIRMWARE_DIR/requirements.txt" } _qmk_install_drivers() { -- cgit v1.2.3 From d694488e2e39e9b599775a49fd711acc768e3915 Mon Sep 17 00:00:00 2001 From: HorrorTroll Date: Sat, 2 Jul 2022 21:08:38 +0700 Subject: Added new keyboard KB16-01 (#17418) --- keyboards/doio/kb16/config.h | 98 ++++++ keyboards/doio/kb16/info.json | 40 +++ keyboards/doio/kb16/kb16.c | 66 ++++ keyboards/doio/kb16/kb16.h | 47 +++ keyboards/doio/kb16/keymaps/bongocat/config.h | 45 +++ keyboards/doio/kb16/keymaps/bongocat/keymap.c | 180 ++++++++++ .../doio/kb16/keymaps/bongocat/oled/bongocat.c | 378 +++++++++++++++++++++ .../doio/kb16/keymaps/bongocat/oled/bongocat.h | 17 + keyboards/doio/kb16/keymaps/bongocat/rules.mk | 9 + keyboards/doio/kb16/keymaps/default/keymap.c | 137 ++++++++ keyboards/doio/kb16/keymaps/default/rules.mk | 2 + keyboards/doio/kb16/keymaps/via/keymap.c | 172 ++++++++++ keyboards/doio/kb16/keymaps/via/rules.mk | 1 + keyboards/doio/kb16/lib/glcdfont.c | 249 ++++++++++++++ .../doio/kb16/lib/layer_status/layer_status.c | 167 +++++++++ .../doio/kb16/lib/layer_status/layer_status.h | 18 + keyboards/doio/kb16/lib/logo.c | 61 ++++ keyboards/doio/kb16/lib/logo.h | 18 + keyboards/doio/kb16/readme.md | 26 ++ keyboards/doio/kb16/rules.mk | 36 ++ 20 files changed, 1767 insertions(+) create mode 100644 keyboards/doio/kb16/config.h create mode 100644 keyboards/doio/kb16/info.json create mode 100644 keyboards/doio/kb16/kb16.c create mode 100644 keyboards/doio/kb16/kb16.h create mode 100644 keyboards/doio/kb16/keymaps/bongocat/config.h create mode 100644 keyboards/doio/kb16/keymaps/bongocat/keymap.c create mode 100644 keyboards/doio/kb16/keymaps/bongocat/oled/bongocat.c create mode 100644 keyboards/doio/kb16/keymaps/bongocat/oled/bongocat.h create mode 100644 keyboards/doio/kb16/keymaps/bongocat/rules.mk create mode 100644 keyboards/doio/kb16/keymaps/default/keymap.c create mode 100644 keyboards/doio/kb16/keymaps/default/rules.mk create mode 100644 keyboards/doio/kb16/keymaps/via/keymap.c create mode 100644 keyboards/doio/kb16/keymaps/via/rules.mk create mode 100644 keyboards/doio/kb16/lib/glcdfont.c create mode 100644 keyboards/doio/kb16/lib/layer_status/layer_status.c create mode 100644 keyboards/doio/kb16/lib/layer_status/layer_status.h create mode 100644 keyboards/doio/kb16/lib/logo.c create mode 100644 keyboards/doio/kb16/lib/logo.h create mode 100644 keyboards/doio/kb16/readme.md create mode 100644 keyboards/doio/kb16/rules.mk diff --git a/keyboards/doio/kb16/config.h b/keyboards/doio/kb16/config.h new file mode 100644 index 0000000000..635aa89cab --- /dev/null +++ b/keyboards/doio/kb16/config.h @@ -0,0 +1,98 @@ +/* Copyright 2022 DOIO + * Copyright 2022 HorrorTroll + * + * 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 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xD010 +#define PRODUCT_ID 0x1601 +#define DEVICE_VER 0x0001 +#define MANUFACTURER DOIO +#define PRODUCT KB16-01 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 7 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D5, D4, D3, D2 } +#define MATRIX_COL_PINS { F5, F4, F1, F0, B7, B4, B5 } + +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Forcing to use NKRO instead 6KRO */ +#define FORCE_NKRO + +/* Larger keys per scan */ +#define QMK_KEYS_PER_SCAN 12 + +/* Use the custom font */ +#define OLED_FONT_H "lib/glcdfont.c" + +/* Encoder pins */ +#define ENCODERS_PAD_A { F7, C7, D7 } +#define ENCODERS_PAD_B { E6, C6, D6 } + +#ifdef RGB_MATRIX_ENABLE + /* RGB Matrix config */ + #define RGB_DI_PIN F6 + #define DRIVER_LED_TOTAL 16 + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 + #define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS + #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_UP_DOWN + #define RGB_MATRIX_KEYPRESSES + + /* RGB Matrix effect */ + #define ENABLE_RGB_MATRIX_ALPHAS_MODS + #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN + #define ENABLE_RGB_MATRIX_BREATHING + #define ENABLE_RGB_MATRIX_BAND_SAT + #define ENABLE_RGB_MATRIX_BAND_VAL + #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT + #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL + #define ENABLE_RGB_MATRIX_CYCLE_ALL + #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN + #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN + #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL + #define ENABLE_RGB_MATRIX_DUAL_BEACON + #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS + #define ENABLE_RGB_MATRIX_RAINDROPS + #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + #define ENABLE_RGB_MATRIX_HUE_BREATHING + #define ENABLE_RGB_MATRIX_HUE_PENDULUM + #define ENABLE_RGB_MATRIX_HUE_WAVE + #define ENABLE_RGB_MATRIX_PIXEL_RAIN + #define ENABLE_RGB_MATRIX_PIXEL_FLOW + #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL + + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + #define ENABLE_RGB_MATRIX_MULTISPLASH + #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif diff --git a/keyboards/doio/kb16/info.json b/keyboards/doio/kb16/info.json new file mode 100644 index 0000000000..08ef309f19 --- /dev/null +++ b/keyboards/doio/kb16/info.json @@ -0,0 +1,40 @@ +{ + "keyboard_name": "KB16-01", + "url": "", + "maintainer": "HorrorTroll", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"1!", "x":0, "y":0}, + {"label":"2@", "x":1, "y":0}, + {"label":"3#", "x":2, "y":0}, + {"label":"4$", "x":3, "y":0}, + {"label":"Encoder 1 CCW", "x":4.25, "y":0, "w":0.5}, + {"label":"Encoder 1", "x":4.75, "y":0}, + {"label":"Encoder 1 CW", "x":5.75, "y":0, "w":0.5}, + {"label":"Encoder 2 CCW", "x":6.25, "y":0, "w":0.5}, + {"label":"Encoder 2", "x":6.75, "y":0}, + {"label":"Encoder 2 CW", "x":7.75, "y":0, "w":0.5}, + + {"label":"5%", "x":0, "y":1}, + {"label":"6^", "x":1, "y":1}, + {"label":"7&", "x":2, "y":1}, + {"label":"8*", "x":3, "y":1}, + + {"label":"9(", "x":0, "y":2}, + {"label":"0)", "x":1, "y":2}, + {"label":"\u2191", "x":2, "y":2}, + {"label":"Enter", "x":3, "y":2}, + + {"label":"Encoder 3 CCW", "x":5.25, "y":2.5, "w":0.5}, + {"label":"Encoder 3", "x":5.75, "y":2.5}, + {"label":"Encoder 3 CW", "x":6.75, "y":2.5, "w":0.5}, + + {"label":"Fn", "x":0, "y":3}, + {"label":"\u2190", "x":1, "y":3}, + {"label":"\u2193", "x":2, "y":3}, + {"label":"\u2192", "x":3, "y":3} + ] + } + } +} diff --git a/keyboards/doio/kb16/kb16.c b/keyboards/doio/kb16/kb16.c new file mode 100644 index 0000000000..037f561e97 --- /dev/null +++ b/keyboards/doio/kb16/kb16.c @@ -0,0 +1,66 @@ +/* Copyright 2022 DOIO + * Copyright 2022 HorrorTroll + * + * 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 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "kb16.h" + +// OLED animation +#include "lib/logo.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + { 0, 1, 2, 3, NO_LED, NO_LED, NO_LED }, + { 4, 5, 6, 7, NO_LED, NO_LED, NO_LED }, + { 8, 9, 10, 11, NO_LED, NO_LED, NO_LED }, + { 12, 13, 14, 15, NO_LED, NO_LED, NO_LED } +}, { + {0 , 0}, {75 , 0}, {149, 0}, {224, 0}, + {0 , 21}, {75 , 21}, {149, 21}, {224, 21}, + {0 , 43}, {75 , 43}, {149, 43}, {224, 43}, + {0 , 64}, {75 , 64}, {149, 64}, {224, 64}, +}, { + 1, 1, 1, 1, + 1, 4, 4, 1, + 1, 4, 4, 1, + 1, 1, 1, 1, +} }; +#endif + +#ifdef OLED_ENABLE + uint16_t startup_timer; + + oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + startup_timer = timer_read(); + + return rotation; + } + + bool oled_task_kb(void) { + static bool finished_logo = false; + + if ((timer_elapsed(startup_timer) < 5000) && !finished_logo) { + render_logo(); + } else { + finished_logo = true; + + if (!oled_task_user()) { + return false; + } + } + + return true; + } +#endif diff --git a/keyboards/doio/kb16/kb16.h b/keyboards/doio/kb16/kb16.h new file mode 100644 index 0000000000..c4dc7cfed1 --- /dev/null +++ b/keyboards/doio/kb16/kb16.h @@ -0,0 +1,47 @@ +/* Copyright 2022 DOIO + * Copyright 2022 HorrorTroll + * + * 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 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +/* 06 ◯ 05 16 ◯ 15 + * ┌───┬───┬───┬───┐ ┌───┐ ┌───┐ + * │00 │01 │02 │03 │ │04 │ │14 │ + * ├───┼───┼───┼───┤ └───┘ └───┘ + * │10 │11 │12 │13 │ + * ├───┼───┼───┼───┤ 26 ◯ 25 + * │20 │21 │22 │23 │ ┌───┐ + * ├───┼───┼───┼───┤ │24 │ + * │30 │31 │32 │33 │ └───┘ + * └───┴───┴───┴───┘ + */ + +#define LAYOUT( \ + K00, K01, K02, K03, K06, K04, K05, \ + K10, K11, K12, K13, K16, K14, K15, \ + K20, K21, K22, K23, K26, K24, K25, \ + K30, K31, K32, K33 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { K20, K21, K22, K23, K24, K25, K26 }, \ + { K30, K31, K32, K33, XXX, XXX, XXX } \ +} + diff --git a/keyboards/doio/kb16/keymaps/bongocat/config.h b/keyboards/doio/kb16/keymaps/bongocat/config.h new file mode 100644 index 0000000000..bb22eebb1b --- /dev/null +++ b/keyboards/doio/kb16/keymaps/bongocat/config.h @@ -0,0 +1,45 @@ +/* Copyright 2022 HorrorTroll + * + * 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 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +/* Additional thing to reduce compiled size */ +#define NO_ACTION_ONESHOT +#define LAYER_STATE_8BIT + +#ifdef RGB_MATRIX_ENABLE + /* RGB Matrix config */ + #undef RGB_MATRIX_KEYPRESSES + + /* RGB Matrix effect */ + #undef ENABLE_RGB_MATRIX_ALPHAS_MODS + #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN + #undef ENABLE_RGB_MATRIX_BREATHING + #undef ENABLE_RGB_MATRIX_BAND_SAT + #undef ENABLE_RGB_MATRIX_BAND_VAL + #undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT + #undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL + #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN + #undef ENABLE_RGB_MATRIX_DUAL_BEACON + #undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS + #undef ENABLE_RGB_MATRIX_RAINDROPS + #undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + #undef ENABLE_RGB_MATRIX_HUE_PENDULUM + #undef ENABLE_RGB_MATRIX_HUE_WAVE + #undef ENABLE_RGB_MATRIX_PIXEL_RAIN + #undef ENABLE_RGB_MATRIX_PIXEL_FLOW + #undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL +#endif diff --git a/keyboards/doio/kb16/keymaps/bongocat/keymap.c b/keyboards/doio/kb16/keymaps/bongocat/keymap.c new file mode 100644 index 0000000000..b60688a385 --- /dev/null +++ b/keyboards/doio/kb16/keymaps/bongocat/keymap.c @@ -0,0 +1,180 @@ +/* Copyright 2022 HorrorTroll + * + * 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 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +// OLED animation +#include "oled/bongocat.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +enum layer_names { + _BASE, + _FN, + _FN1, + _FN2 +}; + +// enum layer_keycodes { }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + ┌───┬───┬───┬───┐ ┌───┐ ┌───┐ + │ 1 │ 2 │ 3 │ 4 │ │Ply│ │TO1│ + ├───┼───┼───┼───┤ └───┘ └───┘ + │ 5 │ 6 │ 7 │ 8 │ + ├───┼───┼───┼───┤ + │ 9 │ 0 │ ↑ │Ent│ ┌───┐ + ├───┼───┼───┼───┤ │Mut│ + │Fn2│ ← │ ↓ │ → │ └───┘ + └───┴───┴───┴───┘ + ┌───┬───┬───┬───┐ ┌───┐ ┌───┐ + │ ! │ @ │ # │ $ │ │ │ │ │ + ├───┼───┼───┼───┤ └───┘ └───┘ + │ % │ ^ │ & │ * │ + ├───┼───┼───┼───┤ + │ ( │ ) │ │ │ ┌───┐ + ├───┼───┼───┼───┤ │ │ + │ │ │ │ │ └───┘ + └───┴───┴───┴───┘ +*/ + /* Row: 0 1 2 3 4 5 6 */ + [_BASE] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_MPRV, KC_MPLY, KC_MNXT, + KC_5, KC_6, KC_7, KC_8, KC_PGDN, TO(_FN), KC_PGUP, + KC_9, KC_0, KC_UP, KC_ENT, KC_VOLD, KC_MUTE, KC_VOLU, + MO(_FN2), KC_LEFT, KC_DOWN, KC_RIGHT + ), + +/* + ┌───┬───┬───┬───┐ ┌───┐ ┌───┐ + │ │ │ │ │ │ │ │ │ + ├───┼───┼───┼───┤ └───┘ └───┘ + │ │ │ │ │ + ├───┼───┼───┼───┤ + │ │ │ │ │ ┌───┐ + ├───┼───┼───┼───┤ │ │ + │ │ │ │ │ └───┘ + └───┴───┴───┴───┘ +*/ + /* Row: 0 1 2 3 4 5 6 */ + [_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, TO(_FN1), _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ + ), + +/* + ┌───┬───┬───┬───┐ ┌───┐ ┌───┐ + │ │ │ │ │ │ │ │ │ + ├───┼───┼───┼───┤ └───┘ └───┘ + │ │ │ │ │ + ├───┼───┼───┼───┤ + │ │ │ │ │ ┌───┐ + ├───┼───┼───┼───┤ │ │ + │ │ │ │ │ └───┘ + └───┴───┴───┴───┘ +*/ + /* Row: 0 1 2 3 4 5 6 */ + [_FN1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, TO(_FN2), _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ + ), + +/* + ┌───┬───┬───┬───┐ ┌───┐ ┌───┐ + │Spi│Spd│ │ │ │ │ │TO0│ + ├───┼───┼───┼───┤ └───┘ └───┘ + │Sai│Sad│ │ │ + ├───┼───┼───┼───┤ + │Tog│Mod│Hui│ │ ┌───┐ + ├───┼───┼───┼───┤ │ │ + │ │Vai│Hud│Vad│ └───┘ + └───┴───┴───┴───┘ +*/ + /* Row: 0 1 2 3 4 5 6 */ + [_FN2] = LAYOUT( + RGB_SPI, RGB_SPD, _______, QK_BOOT, _______, _______, _______, + RGB_SAI, RGB_SAD, _______, _______, _______, TO(_BASE), _______, + RGB_TOG, RGB_MOD, RGB_HUI, _______, _______, _______, _______, + _______, RGB_VAI, RGB_HUD, RGB_VAD + ), +}; + +#ifdef OLED_ENABLE + bool oled_task_user(void) { + led_t led_usb_state = host_keyboard_led_state(); + + render_bongocat(); + oled_set_cursor(14, 0); // sets cursor to (column, row) using charactar spacing (4 rows on 128x32 screen, anything more will overflow back to the top) + oled_write_P(PSTR("WPM:"), false); + oled_write(get_u8_str(get_current_wpm(), '0'), false); // writes wpm on top right corner of string + oled_set_cursor(17, 2); + oled_write_P(led_usb_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false); + oled_set_cursor(17, 3); + oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRL") : PSTR(" "), false); + + return true; + } +#endif + +#ifdef ENCODER_ENABLE + +#define ENCODERS 3 +static uint8_t encoder_state[ENCODERS] = {0}; +static keypos_t encoder_cw[ENCODERS] = {{ 5, 0 }, { 5, 1 }, { 5, 2 }}; +static keypos_t encoder_ccw[ENCODERS] = {{ 6, 0 }, { 6, 1 }, { 6, 2 }}; + +void encoder_action_unregister(void) { + for (int index = 0; index < ENCODERS; ++index) { + if (encoder_state[index]) { + keyevent_t encoder_event = (keyevent_t) { + .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], + .pressed = false, + .time = (timer_read() | 1) + }; + encoder_state[index] = 0; + action_exec(encoder_event); + } + } +} + +void encoder_action_register(uint8_t index, bool clockwise) { + keyevent_t encoder_event = (keyevent_t) { + .key = clockwise ? encoder_cw[index] : encoder_ccw[index], + .pressed = true, + .time = (timer_read() | 1) + }; + encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); + action_exec(encoder_event); +} + +void matrix_scan_user(void) { + encoder_action_unregister(); +} + +bool encoder_update_user(uint8_t index, bool clockwise) { + encoder_action_register(index, clockwise); + return false; +} +#endif diff --git a/keyboards/doio/kb16/keymaps/bongocat/oled/bongocat.c b/keyboards/doio/kb16/keymaps/bongocat/oled/bongocat.c new file mode 100644 index 0000000000..12ca8694c1 --- /dev/null +++ b/keyboards/doio/kb16/keymaps/bongocat/oled/bongocat.c @@ -0,0 +1,378 @@ +/* Copyright 2022 HorrorTroll + * + * 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 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "quantum.h" + +// WPM-responsive animation stuff here +#define IDLE_FRAMES 5 +#define IDLE_SPEED 10 // below this wpm value your animation will idle +// #define PREP_FRAMES 1 // uncomment if >1 +#define TAP_FRAMES 2 +#define ANIM_WPM_LOWER 20 // above this wpm value typing animation to trigger +#define ANIM_FRAME_DURATION_MAX 450 // longest animation duration in ms +#define ANIM_FRAME_DURATION_MIN 100 // shortest animation duration in ms +#define IDLE_FRAME_DURATION 300 // how long each frame lasts in ms +#define ANIM_FRAME_RATIO 2.5 // how aggressively animation speeds up with wpm +// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing +#define ANIM_SIZE 525 // number of bytes in array, minimize for adequate firmware size, max is 1024 +#define MAX(x, y) (((x) > (y)) ? (x) : (y)) // Math.max macro + +uint32_t curr_anim_duration = 0; // variable animation duration +uint32_t bongo_timer = 0; +uint32_t bongo_sleep = 0; +uint8_t current_idle_frame = 0; +// uint8_t current_prep_frame = 0; // uncomment if PREP_FRAMES >1 +uint8_t current_tap_frame = 0; + +// Code containing pixel art, contains: +// 5 idle frames, 1 prep frame, and 2 tap frames + +// To make your own pixel art: +// save a png/jpeg of an 128x32 image (resource: https://www.pixilart.com/draw ) +// follow this guide up to and including "CONVERT YOUR IMAGE" https://docs.splitkb.com/hc/en-us/articles/360013811280-How-do-I-convert-an-image-for-use-on-an-OLED-display- +// replace numbers in brackets with your own +// if you start getting errors when compiling make sure you didn't accedentally delete a bracket +void render_bongocat(void) { + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { + { + //Idle 1 - 128x32 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xce, 0x9c, 0xf8, 0xfc, 0xfe, 0x80, 0xe0, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xf0, + 0xf8, 0xfc, 0xfe, 0xff, 0xfe, 0xfc, 0xf8, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0xc0, 0x80, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x38, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0x31, 0x00, 0x08, + 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, + 0xc0, 0xe0, 0xf0, 0xf8, 0xf8, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xcf, 0xff, + 0xff, 0xbf, 0x7f, 0x7f, 0xbf, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfe, 0xfe, 0xfc, 0xfc, 0xfc, 0xfc, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x30, 0x38, 0x2c, 0x04, 0x64, 0xf8, 0xfe, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x7f, 0xbf, 0x8f, 0x27, 0x27, 0x27, 0xc7, 0xc7, 0x4f, 0x4f, 0x8f, 0x8f, + 0x9f, 0x9f, 0x1f, 0x1f, 0x3f, 0x3e, 0x3e, 0x3f, 0x7f, 0x7f, 0x7f, 0x7f, 0xfc, 0xfc, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xe0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x60, 0x30, 0x10, 0x18, 0x08, 0x08, 0x08, 0x18, 0x10, 0x30, + 0x60, 0x40, 0xc0, 0x86, 0x87, 0x85, 0xc4, 0x49, 0x69, 0x3e, 0x0e, 0x13, 0x11, 0x12, 0x12, 0x3d, + 0x2d, 0x25, 0x26, 0x44, 0x68, 0x78, 0x58, 0x9d, 0x97, 0x93, 0xe3, 0x62, 0x34, 0x3c, 0x2c, 0x26, + 0xc7, 0xc5, 0x69, 0x39, 0x19, 0x1d, 0x36, 0xa2, 0xe2, 0x62, 0x24, 0x18, 0x3c, 0x7e, 0x7f, 0x7f, + 0x7f, 0xbf, 0x3f, 0x1f, 0x1f, 0x8f, 0xe7, 0x63, 0x27, 0x27, 0x47, 0x47, 0xcf, 0xcf, 0x0f, 0x08, + 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + //Idle 2 - 128x32 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xce, 0x9c, 0xf8, 0xfc, 0xfe, 0x80, 0xe0, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xe0, 0xf0, + 0xf8, 0xfc, 0xfe, 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x38, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0x31, 0x00, 0x08, + 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, + 0xc0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf8, 0xf8, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0x9f, 0x9f, 0xff, + 0xff, 0x7f, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfe, 0xfe, 0xfc, 0xfc, 0xfc, 0xfc, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x30, 0x38, 0x2c, 0x04, 0x64, 0xf8, 0xfe, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x7f, 0xbf, 0x8f, 0x27, 0x27, 0x27, 0xc7, 0xc7, 0x4f, 0x4f, 0x8f, 0x8f, + 0x9f, 0x9f, 0x1e, 0x1e, 0x3f, 0x3d, 0x3d, 0x3e, 0x7f, 0x7f, 0x7f, 0x7f, 0xf9, 0xf9, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf0, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x60, 0x30, 0x10, 0x18, 0x08, 0x08, 0x08, 0x18, 0x10, 0x30, + 0x60, 0x40, 0xc0, 0x86, 0x87, 0x85, 0xc4, 0x49, 0x69, 0x3e, 0x0e, 0x13, 0x11, 0x12, 0x12, 0x3d, + 0x2d, 0x25, 0x26, 0x44, 0x68, 0x78, 0x58, 0x9d, 0x97, 0x93, 0xe3, 0x62, 0x34, 0x3c, 0x2c, 0x26, + 0xc7, 0xc5, 0x69, 0x39, 0x19, 0x1d, 0x36, 0xa2, 0xe2, 0x62, 0x24, 0x18, 0x3c, 0x7e, 0x7f, 0x7f, + 0x7f, 0xbf, 0x3f, 0x1f, 0x1f, 0x8f, 0xe7, 0x63, 0x27, 0x27, 0x47, 0x47, 0xcf, 0xcf, 0x0f, 0x08, + 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + //Idle 3 - 128x32 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xce, 0x9c, 0xf8, 0xfc, 0xfe, 0x80, 0xe0, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xe0, + 0xf0, 0xf8, 0xfc, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x38, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0x31, 0x00, 0x08, + 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, + 0xc0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf8, 0xf8, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0x9f, 0x9f, 0xff, + 0xff, 0x7f, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xfe, 0xfc, 0xfc, 0xf8, 0xf8, 0xf8, 0xf8, 0xfc, 0xfc, 0xfe, 0xfe, 0xfe, 0x7e, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x30, 0x38, 0x2c, 0x04, 0x64, 0xf8, 0xfe, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x7f, 0xbf, 0x8f, 0x27, 0x27, 0x27, 0xc7, 0xc7, 0x4f, 0x4f, 0x8f, 0x8f, + 0x9f, 0x9f, 0x1e, 0x1e, 0x3f, 0x3d, 0x3d, 0x3e, 0x7f, 0x7f, 0x7f, 0x7f, 0xf9, 0xf9, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf0, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x60, 0x30, 0x10, 0x18, 0x08, 0x08, 0x08, 0x18, 0x10, 0x30, + 0x60, 0x40, 0xc0, 0x86, 0x87, 0x85, 0xc4, 0x49, 0x69, 0x3e, 0x0e, 0x13, 0x11, 0x12, 0x12, 0x3d, + 0x2d, 0x25, 0x26, 0x44, 0x68, 0x78, 0x58, 0x9d, 0x97, 0x93, 0xe3, 0x62, 0x34, 0x3c, 0x2c, 0x26, + 0xc7, 0xc5, 0x69, 0x39, 0x19, 0x1d, 0x36, 0xa2, 0xe2, 0x62, 0x24, 0x18, 0x3c, 0x7e, 0x7f, 0x7f, + 0x7f, 0xbf, 0x3f, 0x1f, 0x1f, 0x8f, 0xe7, 0x63, 0x27, 0x27, 0x47, 0x47, 0xcf, 0xcf, 0x0f, 0x08, + 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + //Idle 4 - 128x32 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xce, 0x9c, 0xf8, 0xfc, 0xfe, 0x80, 0xe0, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xe0, + 0xf0, 0xf8, 0xfc, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x38, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0x31, 0x00, 0x08, + 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, + 0xc0, 0xe0, 0xf0, 0xf8, 0xf8, 0xfc, 0xfc, 0xfc, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xcf, 0xcf, 0xff, + 0xff, 0xbf, 0x7f, 0x7f, 0xbf, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xfe, 0xfc, 0xfc, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xfc, 0xfc, 0xfc, 0xfc, 0x3c, 0x1c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x30, 0x38, 0x2c, 0x04, 0x64, 0xf8, 0xfe, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x7f, 0xbf, 0x8f, 0x27, 0x27, 0x27, 0xc7, 0xc7, 0x4f, 0x4f, 0x8f, 0x8f, + 0x9f, 0x9f, 0x1f, 0x1f, 0x3f, 0x3e, 0x3e, 0x3f, 0x7f, 0x7f, 0x7f, 0x7f, 0xfc, 0xfc, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xe0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x60, 0x30, 0x10, 0x18, 0x08, 0x08, 0x08, 0x18, 0x10, 0x30, + 0x60, 0x40, 0xc0, 0x86, 0x87, 0x85, 0xc4, 0x49, 0x69, 0x3e, 0x0e, 0x13, 0x11, 0x12, 0x12, 0x3d, + 0x2d, 0x25, 0x26, 0x44, 0x68, 0x78, 0x58, 0x9d, 0x97, 0x93, 0xe3, 0x62, 0x34, 0x3c, 0x2c, 0x26, + 0xc7, 0xc5, 0x69, 0x39, 0x19, 0x1d, 0x36, 0xa2, 0xe2, 0x62, 0x24, 0x18, 0x3c, 0x7e, 0x7f, 0x7f, + 0x7f, 0xbf, 0x3f, 0x1f, 0x1f, 0x8f, 0xe7, 0x63, 0x27, 0x27, 0x47, 0x47, 0xcf, 0xcf, 0x0f, 0x08, + 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + //Idle 5 - 128x32 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xce, 0x9c, 0xf8, 0xfc, 0xfe, 0x80, 0xe0, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xf0, + 0xf8, 0xfc, 0xfe, 0xff, 0xfe, 0xfc, 0xf8, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0xc0, 0x80, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x38, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0x31, 0x00, 0x08, + 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, + 0xc0, 0xe0, 0xf0, 0xf8, 0xf8, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xcf, 0xff, + 0xff, 0xbf, 0x7f, 0x7f, 0xbf, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfe, 0xfe, 0xfc, 0xfc, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x0f, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x30, 0x38, 0x2c, 0x04, 0x64, 0xf8, 0xfe, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x7f, 0xbf, 0x8f, 0x27, 0x27, 0x27, 0xc7, 0xc7, 0x4f, 0x4f, 0x8f, 0x8f, + 0x9f, 0x9f, 0x1f, 0x1f, 0x3f, 0x3e, 0x3e, 0x3f, 0x7f, 0x7f, 0x7f, 0x7f, 0xfc, 0xfc, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xe0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x60, 0x30, 0x10, 0x18, 0x08, 0x08, 0x08, 0x18, 0x10, 0x30, + 0x60, 0x40, 0xc0, 0x86, 0x87, 0x85, 0xc4, 0x49, 0x69, 0x3e, 0x0e, 0x13, 0x11, 0x12, 0x12, 0x3d, + 0x2d, 0x25, 0x26, 0x44, 0x68, 0x78, 0x58, 0x9d, 0x97, 0x93, 0xe3, 0x62, 0x34, 0x3c, 0x2c, 0x26, + 0xc7, 0xc5, 0x69, 0x39, 0x19, 0x1d, 0x36, 0xa2, 0xe2, 0x62, 0x24, 0x18, 0x3c, 0x7e, 0x7f, 0x7f, + 0x7f, 0xbf, 0x3f, 0x1f, 0x1f, 0x8f, 0xe7, 0x63, 0x27, 0x27, 0x47, 0x47, 0xcf, 0xcf, 0x0f, 0x08, + 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }; + + static const char PROGMEM prep[][ANIM_SIZE] = { + { + //Prepare - 128x32 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xce, 0x9c, 0xf8, 0xfc, 0xfe, 0x80, 0xe0, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xf0, + 0xf0, 0xf8, 0xfc, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x38, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0x31, 0x00, 0x08, + 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0xf0, 0xf8, + 0xdc, 0x36, 0x3e, 0xee, 0xfc, 0xe0, 0x9c, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xcf, 0xff, + 0xff, 0xbf, 0x7f, 0x7f, 0xbf, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x7e, 0xbe, 0xbc, 0xbc, 0x7c, 0xfc, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x30, 0x38, 0x2c, 0x44, 0xc4, 0xc4, 0x68, 0x78, + 0x59, 0x89, 0x91, 0x91, 0xd3, 0xf3, 0xa3, 0x23, 0x27, 0x27, 0xc7, 0xc7, 0x4f, 0x4f, 0x8f, 0x8f, + 0x9f, 0x9f, 0x1f, 0x1f, 0x3f, 0x3e, 0x3e, 0x3f, 0x7f, 0x7f, 0x7f, 0x7f, 0xfc, 0xfc, 0xff, 0x81, + 0xfa, 0xff, 0xe6, 0xe7, 0xfd, 0xff, 0xfc, 0xf3, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xe0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x60, 0x30, 0x10, 0x18, 0x08, 0x08, 0x08, 0x18, 0x10, 0x30, + 0x60, 0x40, 0xc0, 0x86, 0x87, 0x85, 0xc4, 0x49, 0x69, 0x3e, 0x0e, 0x13, 0x11, 0x13, 0x12, 0x3c, + 0x2c, 0x26, 0x27, 0x45, 0x68, 0x78, 0x58, 0x9d, 0x97, 0x93, 0xe3, 0x62, 0x34, 0x3c, 0x2c, 0x26, + 0xc7, 0xc5, 0x69, 0x39, 0x19, 0x1d, 0x36, 0xa2, 0xe2, 0x62, 0x34, 0x3c, 0x2c, 0x44, 0xc8, 0xc8, + 0xe9, 0xb9, 0x11, 0x11, 0x13, 0x93, 0xe3, 0x63, 0x27, 0x27, 0x47, 0x47, 0xcf, 0xcf, 0x0f, 0x08, + 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }; + + static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = { + { + //Tap left - 128x32 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xce, 0x9c, 0xf8, 0xfc, 0xfe, 0x80, 0xe0, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xf0, + 0xf0, 0xf8, 0xfc, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x38, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0x31, 0x00, 0x08, + 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0xf0, 0xf8, + 0xdc, 0x36, 0x3e, 0xee, 0xfc, 0xe0, 0x9c, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xcf, 0xff, + 0xff, 0xbf, 0x7f, 0x7f, 0xbf, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfe, 0xfe, 0xfc, 0xfc, 0xfc, 0xfc, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x30, 0x38, 0x2c, 0x44, 0xc4, 0xc4, 0x68, 0x78, + 0x59, 0x89, 0x91, 0x91, 0xd3, 0xf3, 0xa3, 0x23, 0x27, 0x27, 0xc7, 0xc7, 0x4f, 0x4f, 0x8f, 0x8f, + 0x9f, 0x9f, 0x1f, 0x1f, 0x3f, 0x3e, 0x3e, 0x3f, 0x7f, 0x7f, 0x7f, 0x7f, 0xfc, 0xfc, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xe0, 0x00, 0x00, + 0x3f, 0x1f, 0x07, 0x83, 0xc0, 0xe0, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x60, 0x30, 0x10, 0x18, 0x08, 0x08, 0x08, 0x18, 0x10, 0x30, + 0x60, 0x40, 0xc0, 0x86, 0x87, 0x85, 0xc4, 0x49, 0x69, 0x3e, 0x0e, 0x13, 0x11, 0x13, 0x12, 0x3c, + 0x2c, 0x26, 0x27, 0x45, 0x68, 0x78, 0x58, 0x9d, 0x97, 0x93, 0xe3, 0x62, 0x34, 0x3c, 0x2c, 0x26, + 0xc7, 0xc5, 0x69, 0x39, 0x19, 0x1d, 0x36, 0xa2, 0xe2, 0x62, 0x24, 0x18, 0x3c, 0x7e, 0x7f, 0x7f, + 0x7f, 0xbf, 0x3f, 0x1f, 0x1f, 0x8f, 0xe7, 0x63, 0x27, 0x27, 0x47, 0x47, 0xcf, 0xcf, 0x0f, 0x08, + 0x10, 0x10, 0x11, 0x11, 0x21, 0x23, 0x23, 0x21, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + //Tap right - 128x32 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xce, 0x9c, 0xf8, 0xfc, 0xfe, 0x80, 0xe0, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xf0, + 0xf0, 0xf8, 0xfc, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x38, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0x31, 0x00, 0x08, + 0x10, 0x10, 0x10, 0x10, 0xa0, 0xa0, 0x20, 0x20, 0x40, 0x46, 0x4f, 0x5f, 0x9f, 0x9c, 0x90, 0x80, + 0xc0, 0xe0, 0xf0, 0xf8, 0xf8, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xcf, 0xff, + 0xff, 0xbf, 0x7f, 0x7f, 0xbf, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x7e, 0xbe, 0xbc, 0xbc, 0x7c, 0xfc, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x07, 0x0f, 0x8f, 0xc7, 0xe3, 0x31, 0x38, 0x2c, 0x04, 0x64, 0xf8, 0xfe, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x7f, 0xbf, 0x8f, 0x27, 0x27, 0x27, 0xc7, 0xc7, 0x4f, 0x4f, 0x8f, 0x8f, + 0x9f, 0x9f, 0x1f, 0x1f, 0x3f, 0x3e, 0x3e, 0x3f, 0x7f, 0x7f, 0x7f, 0x7f, 0xfc, 0xfc, 0xff, 0x81, + 0xfa, 0xff, 0xe6, 0xe7, 0xfd, 0xff, 0xfc, 0xf3, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xe0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x60, 0x30, 0x10, 0x18, 0x08, 0x08, 0x08, 0x18, 0x10, 0x30, + 0x60, 0x40, 0xc0, 0x86, 0x87, 0x85, 0xc4, 0x49, 0x69, 0x3e, 0x0e, 0x13, 0x11, 0x12, 0x12, 0x3d, + 0x2d, 0x25, 0x26, 0x44, 0x68, 0x78, 0x58, 0x9d, 0x97, 0x93, 0xe3, 0x62, 0x34, 0x3c, 0x2c, 0x26, + 0xc7, 0xc5, 0x69, 0x39, 0x19, 0x1d, 0x36, 0xa2, 0xe2, 0x62, 0x34, 0x3c, 0x2c, 0x44, 0xc8, 0xc8, + 0xe9, 0xb9, 0x11, 0x11, 0x13, 0x93, 0xe3, 0x63, 0x27, 0x27, 0x47, 0x47, 0xcf, 0xcf, 0x0f, 0x08, + 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + }; + + // assumes 1 frame prep stage + void animation_phase(void) { + if (get_current_wpm() <= IDLE_SPEED) { + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + } + + if (get_current_wpm() > IDLE_SPEED && get_current_wpm() < ANIM_WPM_LOWER) { + // oled_write_raw_P(prep[abs((PREP_FRAMES-1)-current_prep_frame)], ANIM_SIZE); // uncomment if IDLE_FRAMES >1 + oled_write_raw_P(prep[0], ANIM_SIZE); // remove if IDLE_FRAMES >1 + } + + if (get_current_wpm() >= ANIM_WPM_LOWER) { + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + oled_write_raw_P(tap[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + } + } + + // variable animation duration. Don't want this value to get near zero as it'll bug out. + curr_anim_duration = MAX(ANIM_FRAME_DURATION_MIN, ANIM_FRAME_DURATION_MAX - ANIM_FRAME_RATIO * get_current_wpm()); + + if (get_current_wpm() > ANIM_WPM_LOWER) { + oled_on(); // not essential but turns on animation OLED with any alpha keypress + + if (timer_elapsed32(bongo_timer) > curr_anim_duration) { + bongo_timer = timer_read32(); + animation_phase(); + } + + bongo_sleep = timer_read32(); + } else { + if (timer_elapsed32(bongo_sleep) > OLED_TIMEOUT) { + oled_off(); + } else { + if (timer_elapsed32(bongo_timer) > IDLE_FRAME_DURATION) { + bongo_timer = timer_read32(); + animation_phase(); + } + } + } +} diff --git a/keyboards/doio/kb16/keymaps/bongocat/oled/bongocat.h b/keyboards/doio/kb16/keymaps/bongocat/oled/bongocat.h new file mode 100644 index 0000000000..65ceabc682 --- /dev/null +++ b/keyboards/doio/kb16/keymaps/bongocat/oled/bongocat.h @@ -0,0 +1,17 @@ +/* Copyright 2022 HorrorTroll + * + * 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 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +void render_bongocat(void); diff --git a/keyboards/doio/kb16/keymaps/bongocat/rules.mk b/keyboards/doio/kb16/keymaps/bongocat/rules.mk new file mode 100644 index 0000000000..087a45a944 --- /dev/null +++ b/keyboards/doio/kb16/keymaps/bongocat/rules.mk @@ -0,0 +1,9 @@ +SRC += oled/bongocat.c + +VIA_ENABLE = yes + +# Additional thing to reduce compiled size +GRAVE_ESC_ENABLE = no + +# OLED enabled +WPM_ENABLE = yes diff --git a/keyboards/doio/kb16/keymaps/default/keymap.c b/keyboards/doio/kb16/keymaps/default/keymap.c new file mode 100644 index 0000000000..0d229c753b --- /dev/null +++ b/keyboards/doio/kb16/keymaps/default/keymap.c @@ -0,0 +1,137 @@ +/* Copyright 2022 DOIO + * Copyright 2022 HorrorTroll + * + * 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 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +// OLED animation +#include "lib/layer_status/layer_status.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +enum layer_names { + _BASE, + _FN, + _FN1, + _FN2 +}; + +// enum layer_keycodes { }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + ┌───┬───┬───┬───┐ ┌───┐ ┌───┐ + │ 1 │ 2 │ 3 │ 4 │ │Ply│ │TO1│ + ├───┼───┼───┼───┤ └───┘ └───┘ + │ 5 │ 6 │ 7 │ 8 │ + ├───┼───┼───┼───┤ + │ 9 │ 0 │ ↑ │Ent│ ┌───┐ + ├───┼───┼───┼───┤ │Mut│ + │Fn2│ ← │ ↓ │ → │ └───┘ + └───┴───┴───┴───┘ + ┌───┬───┬───┬───┐ ┌───┐ ┌───┐ + │ ! │ @ │ # │ $ │ │ │ │ │ + ├───┼───┼───┼───┤ └───┘ └───┘ + │ % │ ^ │ & │ * │ + ├───┼───┼───┼───┤ + │ ( │ ) │ │ │ ┌───┐ + ├───┼───┼───┼───┤ │ │ + │ │ │ │ │ └───┘ + └───┴───┴───┴───┘ +*/ + /* Row: 0 1 2 3 4 5 6 */ + [_BASE] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, _______, KC_MPLY, _______, + KC_5, KC_6, KC_7, KC_8, _______, TO(_FN), _______, + KC_9, KC_0, KC_UP, KC_ENT, _______, KC_MUTE, _______, + MO(_FN2), KC_LEFT, KC_DOWN, KC_RIGHT + ), + +/* + ┌───┬───┬───┬───┐ ┌───┐ ┌───┐ + │ │ │ │ │ │ │ │ │ + ├───┼───┼───┼───┤ └───┘ └───┘ + │ │ │ │ │ + ├───┼───┼───┼───┤ + │ │ │ │ │ ┌───┐ + ├───┼───┼───┼───┤ │ │ + │ │ │ │ │ └───┘ + └───┴───┴───┴───┘ +*/ + /* Row: 0 1 2 3 4 5 6 */ + [_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, TO(_FN1), _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ + ), + +/* + ┌───┬───┬───┬───┐ ┌───┐ ┌───┐ + │ │ │ │ │ │ │ │ │ + ├───┼───┼───┼───┤ └───┘ └───┘ + │ │ │ │ │ + ├───┼───┼───┼───┤ + │ │ │ │ │ ┌───┐ + ├───┼───┼───┼───┤ │ │ + │ │ │ │ │ └───┘ + └───┴───┴───┴───┘ +*/ + /* Row: 0 1 2 3 4 5 6 */ + [_FN1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, TO(_FN2), _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ + ), + +/* + ┌───┬───┬───┬───┐ ┌───┐ ┌───┐ + │Spi│Spd│ │ │ │ │ │TO0│ + ├───┼───┼───┼───┤ └───┘ └───┘ + │Sai│Sad│ │ │ + ├───┼───┼───┼───┤ + │Tog│Mod│Hui│ │ ┌───┐ + ├───┼───┼───┼───┤ │ │ + │ │Vai│Hud│Vad│ └───┘ + └───┴───┴───┴───┘ +*/ + /* Row: 0 1 2 3 4 5 6 */ + [_FN2] = LAYOUT( + RGB_SPI, RGB_SPD, _______, QK_BOOT, _______, _______, _______, + RGB_SAI, RGB_SAD, _______, _______, _______, TO(_BASE), _______, + RGB_TOG, RGB_MOD, RGB_HUI, _______, _______, _______, _______, + _______, RGB_VAI, RGB_HUD, RGB_VAD + ), +}; + +#ifdef OLED_ENABLE + bool oled_task_user(void) { + render_layer_status(); + + return true; + } +#endif + +#ifdef ENCODER_MAP_ENABLE