From 89ef654417bdb00688d4598d8a3399d0e167b8f7 Mon Sep 17 00:00:00 2001 From: Jasper-Harvey <73322089+Jasper-Harvey@users.noreply.github.com> Date: Wed, 6 May 2026 19:59:30 +1000 Subject: [PATCH] Adding qmk files for corne. Keymap still needs adjustment... --- .../rev1/keymaps/jasper/animation-utils.c | 99 ++++++ keyboards/crkbd/rev1/keymaps/jasper/config.h | 61 ++++ keyboards/crkbd/rev1/keymaps/jasper/crab.c | 295 ++++++++++++++++ keyboards/crkbd/rev1/keymaps/jasper/keymap.c | 317 ++++++++++++++++++ .../crkbd/rev1/keymaps/jasper/keymap.json | 3 + keyboards/crkbd/rev1/keymaps/jasper/rules.mk | 7 + qmk.json | 6 +- 7 files changed, 786 insertions(+), 2 deletions(-) create mode 100644 keyboards/crkbd/rev1/keymaps/jasper/animation-utils.c create mode 100644 keyboards/crkbd/rev1/keymaps/jasper/config.h create mode 100644 keyboards/crkbd/rev1/keymaps/jasper/crab.c create mode 100644 keyboards/crkbd/rev1/keymaps/jasper/keymap.c create mode 100644 keyboards/crkbd/rev1/keymaps/jasper/keymap.json create mode 100644 keyboards/crkbd/rev1/keymaps/jasper/rules.mk diff --git a/keyboards/crkbd/rev1/keymaps/jasper/animation-utils.c b/keyboards/crkbd/rev1/keymaps/jasper/animation-utils.c new file mode 100644 index 00000000..c1cea914 --- /dev/null +++ b/keyboards/crkbd/rev1/keymaps/jasper/animation-utils.c @@ -0,0 +1,99 @@ +/** + * Utilities for QMK oled animations + * + * Copyright (c) Marek Piechut + * MIT License + */ +#pragma once + +//-------- CONFIGURATION START -------- + +#ifndef ANIM_RENDER_WPM + #define ANIM_RENDER_WPM true +#endif +#ifndef FAST_TYPE_WPM + #define FAST_TYPE_WPM 45 //Switch to fast animation when over words per minute +#endif +#ifndef ANIM_INVERT + #define ANIM_INVERT false //Invert animation color and background +#endif +#ifndef ANIM_BG + #define ANIM_BG 0x00 +#endif +#ifndef ANIM_FRAME_TIME + #define ANIM_FRAME_TIME 250 +#endif +//-------- CONFIGURATION END-------- + +#define ANIM_WPM_WIDTH 22 +#define OLED_ROWS OLED_DISPLAY_HEIGHT / 4 + +static void oled_render_wpm(void) { + static char wpm_str[4]; + + sprintf(wpm_str, "%03d", get_current_wpm()); + oled_set_cursor(0, 1); + oled_write_P(PSTR("WPM"), false); + oled_set_cursor(0, 2); + oled_write(wpm_str, false); +} + +static void oled_render_anim_frame(const char **fast_frames, const char **slow_frames, uint8_t frames_len) { + + static uint32_t anim_timer = 0; + static uint8_t current_frame = 0; + static int16_t frame_offset = ANIM_RENDER_WPM ? ANIM_WPM_WIDTH : 0; + static int8_t step = 8; + + const uint8_t speed = get_current_wpm(); + + + if (timer_elapsed32(anim_timer) > ANIM_FRAME_TIME && speed > 0) { + oled_set_cursor(0, 0); + anim_timer = timer_read32(); + + const bool is_fast = speed > FAST_TYPE_WPM; + const char *frame = is_fast ? fast_frames[current_frame] : slow_frames[current_frame]; + const int8_t bg = ANIM_BG; + + uint8_t frame_start_offset = ANIM_RENDER_WPM ? ANIM_WPM_WIDTH : 0; + current_frame = (current_frame + 1) % frames_len; + + for(int offset = 0; offset <= OLED_MATRIX_SIZE; offset++) { + uint16_t col = offset % OLED_DISPLAY_WIDTH; + + if(col < frame_start_offset) { + continue; + } else if (col < frame_offset || col > frame_offset + ANIM_FRAME_WIDTH) { + oled_write_raw_byte((ANIM_INVERT ? ~bg : bg), offset); + } else if (col <= OLED_DISPLAY_WIDTH) { + uint8_t row = offset / OLED_DISPLAY_WIDTH; + int frame_data_offset = ANIM_FRAME_WIDTH * row + col - frame_offset; + uint8_t col_data = pgm_read_byte(frame + frame_data_offset); + oled_write_raw_byte(ANIM_INVERT ? ~col_data : col_data, offset ); + } + } + + #ifdef ANIM_SCROLL + if(is_fast) { + #ifdef ANIM_BOUNCE + if(frame_offset + ANIM_FRAME_WIDTH > OLED_DISPLAY_WIDTH || frame_offset < frame_start_offset) { + step = -step; + } + #endif + + frame_offset += step; + + if(frame_offset >= OLED_DISPLAY_WIDTH) { + frame_offset = frame_start_offset - ANIM_FRAME_WIDTH + step; + } + } else if (frame_offset > (OLED_DISPLAY_WIDTH - ANIM_FRAME_WIDTH) || frame_offset < frame_start_offset) { + frame_offset = frame_start_offset; + } + #endif + } + + if(ANIM_RENDER_WPM) { + oled_render_wpm(); + } +} \ No newline at end of file diff --git a/keyboards/crkbd/rev1/keymaps/jasper/config.h b/keyboards/crkbd/rev1/keymaps/jasper/config.h new file mode 100644 index 00000000..add2c356 --- /dev/null +++ b/keyboards/crkbd/rev1/keymaps/jasper/config.h @@ -0,0 +1,61 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 + +//#define USE_MATRIX_I2C + +// Because of the shift and space key being shared, this stops a space being registered when I do a space, then quickly shift a key. +// It also means that I cannot double tap and hold to send lots of space characters. +#define QUICK_TAP_TERM 100 // This can also be set on a per key basis +#define TAPPING_TERM 200 +// #define CHORDAL_HOLD +// #define PERMISSIVE_HOLD // This can generate more accidental mod triggers. +// Experimental stuff here: +// This sends the modifier key code, until the mod-tap behaviour is settled. Helps with shift click etc +// #define SPECULATIVE_HOLD +// Suppresses the hold tap modifiers if pressed within FLOW_TAP_TERM +// #define FLOW_TAP_TERM 150 + +// Get words per min on both keyboards so my little screens know how to animate. +#define SPLIT_WPM_ENABLE + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + #define RGBLIGHT_EFFECT_RGB_TEST + #define RGBLIGHT_EFFECT_ALTERNATING + #define RGBLIGHT_EFFECT_TWINKLE + #define RGBLIGHT_LIMIT_VAL 120 + #define RGBLIGHT_HUE_STEP 10 + #define RGBLIGHT_SAT_STEP 17 + #define RGBLIGHT_VAL_STEP 17 +#endif + + +#define SPLIT_HAND_PIN B6 // The promicro (ATmega) pin definition. On the rp2040 its GP21. +#define SPLIT_HAND_PIN_LOW_IS_LEFT + +#define COMBO_ONLY_FROM_LAYER 0 // Layer independant combos. Allows the combos to work on all layers. This also means layer dependant combos will not work. diff --git a/keyboards/crkbd/rev1/keymaps/jasper/crab.c b/keyboards/crkbd/rev1/keymaps/jasper/crab.c new file mode 100644 index 00000000..5b87a180 --- /dev/null +++ b/keyboards/crkbd/rev1/keymaps/jasper/crab.c @@ -0,0 +1,295 @@ +/** + * Big daemon animation with slow and fast typing mode + * Thanks to Pixel Frog for the art: https://pixelfrog-assets.itch.io + * + * ROTATION: + * OLED_ROTATION_0 + * + * Copyright (c) Marek Piechut + * MIT License + */ + +#pragma once + +#define ANIM_SCROLL true +#define ANIM_FRAME_WIDTH 72 +#define ANIM_SIZE 288 +#define ANIM_BOUNCE true + +#include "animation-utils.c" + +static void oled_render_anim(void) { +// 'Idle 01', 72x32px +static const char crab_idle_01 [] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, + 0x40, 0x80, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 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, 0x1e, 0x21, 0x40, 0x47, 0xc8, 0xc8, 0xc8, + 0x47, 0x40, 0x21, 0x9e, 0x40, 0x23, 0x7c, 0x01, 0x7c, 0x13, 0x10, 0x10, 0x13, 0x7c, 0x01, 0x7c, + 0x13, 0x10, 0x10, 0x20, 0xe0, 0x10, 0x08, 0x38, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x38, + 0x08, 0x10, 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, 0x03, 0x04, 0x09, 0x0a, 0x0a, 0xfe, 0xe1, 0xe0, 0xa0, 0xe0, 0xe0, + 0x10, 0x50, 0x50, 0x50, 0x10, 0xe0, 0xe0, 0xe0, 0xa0, 0xa0, 0xe0, 0xa0, 0xe0, 0xf7, 0xf6, 0xf6, + 0x16, 0x16, 0x16, 0x16, 0x0e, 0x02, 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x0f, 0x15, 0x15, 0x1d, 0x05, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x0d, 0x15, 0x17, 0x1f, 0x03, 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 02', 72x32px +static const char crab_idle_02 [] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x40, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x80, 0x00, 0x00, 0xc0, 0x20, 0xa0, + 0x20, 0xc0, 0x00, 0x00, 0xc0, 0x20, 0xa0, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, + 0x0c, 0x02, 0x01, 0x0f, 0x01, 0x02, 0x0c, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x10, 0x20, 0x23, 0xe4, 0x64, 0xe4, + 0x23, 0x20, 0x90, 0x6f, 0x10, 0x09, 0x1e, 0x00, 0x1e, 0x05, 0x04, 0x04, 0x05, 0x1e, 0x00, 0x1e, + 0x05, 0x04, 0x04, 0x08, 0x08, 0x50, 0x60, 0x40, 0x41, 0x22, 0x9e, 0x46, 0x3e, 0x02, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x02, 0x04, 0x05, 0x05, 0xff, 0xf0, 0xf0, 0xd0, 0xf0, 0xf8, + 0xc4, 0xd4, 0xd4, 0xd4, 0xc4, 0xf8, 0xf0, 0xf0, 0xd0, 0xd0, 0xf0, 0xd0, 0xf0, 0xf1, 0xf1, 0xff, + 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x0f, 0x14, 0x14, 0x1c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x0c, 0x15, 0x17, 0x1f, 0x03, 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 03', 72x32px +static const char crab_idle_03 [] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x40, 0x20, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0x20, 0x40, 0x80, 0x00, 0xe0, 0x10, 0x50, + 0x10, 0xe0, 0x00, 0x00, 0x70, 0x88, 0x18, 0x88, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, + 0x18, 0x04, 0x02, 0x1e, 0x02, 0x04, 0x18, 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, 0x07, 0x08, 0x10, 0x11, 0xf2, 0x32, 0x72, + 0x91, 0x90, 0x88, 0x67, 0x10, 0x08, 0x1f, 0x00, 0x1f, 0x04, 0x04, 0x04, 0x04, 0x1f, 0x00, 0x1f, + 0x04, 0x04, 0x04, 0x08, 0x08, 0x90, 0xe0, 0x81, 0x82, 0x44, 0x3c, 0x8c, 0x7c, 0x04, 0x02, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x02, 0x02, 0x02, 0xff, 0xe0, 0xe0, 0xa0, 0xe0, 0xf0, + 0x88, 0xa8, 0xa8, 0xa8, 0x88, 0xf0, 0xe0, 0xe0, 0xa0, 0xa0, 0xe0, 0xa0, 0xe0, 0xe2, 0xe2, 0xfe, + 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x0f, 0x15, 0x15, 0x1d, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x0d, 0x15, 0x17, 0x1f, 0x03, 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 04', 72x32px +static const char crab_idle_04 [] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x40, 0x20, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0x20, 0x40, 0x80, 0x00, 0xe0, 0x10, 0x30, + 0x10, 0xe0, 0x00, 0x00, 0x70, 0x88, 0x18, 0x88, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, + 0x10, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x10, 0x20, 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, 0x07, 0x08, 0x10, 0x11, 0xf2, 0x32, 0x72, + 0x91, 0x90, 0x08, 0xc7, 0x20, 0x10, 0x3f, 0x00, 0x3f, 0x08, 0x08, 0x08, 0x08, 0x3f, 0x00, 0x3f, + 0x08, 0x08, 0x08, 0x10, 0x10, 0x20, 0xc3, 0x04, 0x08, 0x08, 0xf9, 0x19, 0xf9, 0x08, 0x08, 0x04, + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x02, 0x02, 0x02, 0xff, 0xe0, 0xe0, 0xa0, 0xe0, 0xe0, + 0x10, 0x50, 0x50, 0x50, 0x10, 0xe0, 0xe0, 0xe0, 0xa0, 0xa0, 0xe0, 0xa0, 0xe0, 0xe5, 0xe5, 0xfd, + 0x05, 0x05, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x0f, 0x15, 0x15, 0x1d, 0x05, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x0d, 0x15, 0x17, 0x1f, 0x03, 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 05', 72x32px +static const char crab_idle_05 [] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x40, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x80, 0x00, 0x00, 0xe0, 0x10, 0x30, + 0x10, 0xe0, 0x00, 0x00, 0xc0, 0x20, 0xa0, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x40, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x40, 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, 0x0f, 0x10, 0x20, 0x23, 0xe4, 0x64, 0xe4, + 0x23, 0x20, 0x10, 0x8f, 0x40, 0x20, 0x7f, 0x00, 0x7f, 0x10, 0x10, 0x10, 0x11, 0x7e, 0x00, 0x7e, + 0x11, 0x10, 0x10, 0x20, 0x20, 0x40, 0x8f, 0x10, 0x20, 0x23, 0xe4, 0x64, 0xe4, 0x23, 0x20, 0x10, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x02, 0x04, 0x05, 0x05, 0xfe, 0xe1, 0xe0, 0xa0, 0xe0, 0xe0, + 0x10, 0x50, 0x50, 0x50, 0x10, 0xe0, 0xe0, 0xe0, 0xa0, 0xa0, 0xe0, 0xa0, 0xe0, 0xea, 0xeb, 0xfa, + 0x0a, 0x0a, 0x09, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x0f, 0x15, 0x15, 0x1d, 0x05, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x0d, 0x15, 0x17, 0x1f, 0x03, 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 06', 72x32px +static const char crab_idle_06 [] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0xc0, 0x20, 0xa0, + 0x20, 0xc0, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x80, 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, 0x1e, 0x21, 0x40, 0x47, 0xc8, 0xc8, 0xc8, + 0x47, 0x40, 0x21, 0x9e, 0x40, 0x21, 0x7e, 0x00, 0x7e, 0x11, 0x10, 0x10, 0x13, 0x7c, 0x02, 0x7c, + 0x13, 0x10, 0x10, 0x20, 0x20, 0x40, 0x9e, 0x21, 0x40, 0x47, 0xc8, 0xc8, 0xc8, 0x47, 0x40, 0x21, + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x04, 0x09, 0x0a, 0x0a, 0xfe, 0xe1, 0xe0, 0xa0, 0xe0, 0xe0, + 0x10, 0x50, 0x50, 0x50, 0x10, 0xe0, 0xe0, 0xe0, 0xa0, 0xa0, 0xe0, 0xa0, 0xe0, 0xea, 0xeb, 0xfa, + 0x0a, 0x0a, 0x09, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x0f, 0x15, 0x15, 0x1d, 0x05, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x0d, 0x15, 0x17, 0x1f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +// 'Run 01', 72x32px + static const char crab_run_01 [] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x40, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x80, 0x00, 0x00, 0xc0, 0x20, 0x60, + 0x20, 0xc0, 0x00, 0x00, 0x70, 0x88, 0x28, 0x88, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x40, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x40, 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, 0x0f, 0x10, 0x20, 0x23, 0xe4, 0x64, 0x64, + 0xa3, 0xa0, 0xd0, 0x3f, 0x08, 0x05, 0x0e, 0x00, 0x0e, 0x03, 0x02, 0x02, 0x02, 0x0f, 0x00, 0x0f, + 0x02, 0x02, 0x02, 0x04, 0x04, 0x88, 0xff, 0x90, 0xa0, 0xa3, 0x64, 0x64, 0xe4, 0x23, 0x20, 0x10, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x02, 0x02, 0xf2, 0x0f, 0x8c, 0xbc, 0xb4, 0xbc, 0xbc, + 0xe2, 0xea, 0xea, 0xea, 0xe2, 0xfc, 0xbc, 0xbc, 0xb4, 0xb4, 0xbc, 0xb4, 0x3c, 0xfe, 0xfe, 0xfe, + 0x82, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; +// 'Run 02', 72x32px + static const char crab_run_02 [] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x40, 0x20, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0x20, 0x40, 0x80, 0x00, 0xe0, 0x10, 0x50, + 0x10, 0xe0, 0x00, 0x00, 0xe0, 0x10, 0x50, 0x10, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, + 0x20, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0x20, 0x40, 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, 0x07, 0x08, 0x10, 0x11, 0xf2, 0x32, 0x72, + 0x91, 0x90, 0x88, 0x67, 0x10, 0x08, 0x1f, 0x00, 0x1f, 0x04, 0x04, 0x04, 0x04, 0x1f, 0x00, 0x1f, + 0x04, 0x04, 0x04, 0x08, 0x08, 0x90, 0xe7, 0x88, 0x90, 0x91, 0x72, 0x32, 0xf2, 0x11, 0x10, 0x08, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x02, 0x02, 0x02, 0xff, 0x78, 0x78, 0x68, 0x78, 0x78, + 0xc4, 0xd4, 0xd4, 0xd4, 0xc4, 0xf8, 0x78, 0x78, 0x68, 0x68, 0x78, 0x68, 0x78, 0xfa, 0xfa, 0xfe, + 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0f, 0x08, 0x0a, 0x06, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x02, 0x06, 0x0b, 0x0b, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; +// 'Run 03', 72x32px + static const char crab_run_03 [] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x40, 0x40, + 0x40, 0x80, 0x00, 0x00, 0x00, 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, 0x3c, 0x42, 0x81, 0x8f, 0x90, 0x90, 0x90, + 0x8f, 0x81, 0x42, 0xbc, 0x40, 0x23, 0x7c, 0x01, 0x7c, 0x13, 0x10, 0x10, 0x17, 0x78, 0x02, 0x78, + 0x17, 0x10, 0x10, 0x20, 0x20, 0x40, 0xbc, 0x42, 0x81, 0x8f, 0x90, 0x90, 0x90, 0x8f, 0x81, 0x42, + 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x05, 0x09, 0x0a, 0x0a, 0xfe, 0xe1, 0xe0, 0xa0, 0xe0, 0xe0, + 0x10, 0x50, 0x50, 0x50, 0x10, 0xe0, 0xe0, 0xe0, 0xa0, 0xa0, 0xe0, 0xa0, 0xe0, 0xea, 0xeb, 0xfa, + 0x0a, 0x0a, 0x09, 0x05, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x0d, 0x15, 0x15, 0x1d, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x0d, 0x15, 0x17, 0x1f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; +// 'Run 04', 72x32px + static const char crab_run_04 [] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x40, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x80, 0x00, 0x00, 0x70, 0x88, 0x28, + 0x88, 0x70, 0x00, 0x00, 0xc0, 0x20, 0x60, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x40, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x40, 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, 0x0f, 0x10, 0x20, 0x23, 0xe4, 0x64, 0x64, + 0xa3, 0xa0, 0xd0, 0x3f, 0x08, 0x04, 0x0f, 0x00, 0x0f, 0x02, 0x02, 0x02, 0x03, 0x0e, 0x00, 0x0e, + 0x03, 0x02, 0x02, 0x04, 0x04, 0x88, 0xff, 0x90, 0xa0, 0xa3, 0x64, 0x64, 0xe4, 0x23, 0x20, 0x10, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x02, 0x02, 0x02, 0x7f, 0xfc, 0x3c, 0xb4, 0xbc, 0xbc, + 0xe2, 0xea, 0xea, 0xea, 0xe2, 0xfc, 0xbc, 0xbc, 0xb4, 0xb4, 0xbc, 0xb4, 0xbc, 0xfe, 0xfe, 0x7e, + 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; +// 'Run 05', 72x32px + static const char crab_run_05 [] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x40, 0x20, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0x20, 0x40, 0x80, 0x00, 0xe0, 0x10, 0x50, + 0x10, 0xe0, 0x00, 0x00, 0xe0, 0x10, 0x50, 0x10, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, + 0x20, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0x20, 0x40, 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, 0x07, 0x08, 0x10, 0x11, 0xf2, 0x32, 0x72, + 0x91, 0x90, 0x88, 0x67, 0x10, 0x08, 0x1f, 0x00, 0x1f, 0x04, 0x04, 0x04, 0x04, 0x1f, 0x00, 0x1f, + 0x04, 0x04, 0x04, 0x08, 0x08, 0x90, 0xe7, 0x88, 0x90, 0x91, 0x72, 0x32, 0xf2, 0x11, 0x10, 0x08, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x02, 0x02, 0x02, 0xff, 0xf8, 0x78, 0x68, 0x78, 0x78, + 0xc4, 0xd4, 0xd4, 0xd4, 0xc4, 0xf8, 0x78, 0x78, 0x68, 0x68, 0x78, 0x68, 0x78, 0xfa, 0xfa, 0xfe, + 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x03, 0x04, 0x0a, 0x0b, 0x0f, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x03, 0x0e, 0x0a, 0x0b, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; +// 'Run 06', 72x32px + static const char crab_run_06 [] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 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, 0x3c, 0x42, 0x81, 0x8f, 0x90, 0x90, 0x90, + 0x8f, 0x81, 0x42, 0xbc, 0x40, 0x27, 0x78, 0x02, 0x78, 0x17, 0x10, 0x10, 0x13, 0x7c, 0x01, 0x7c, + 0x13, 0x10, 0x10, 0x20, 0x20, 0x40, 0xbc, 0x42, 0x81, 0x8f, 0x90, 0x90, 0x90, 0x8f, 0x81, 0x42, + 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x05, 0x09, 0x0a, 0x0a, 0xfe, 0xe1, 0xe0, 0xa0, 0xe0, 0xe0, + 0x10, 0x50, 0x50, 0x50, 0x10, 0xe0, 0xe0, 0xe0, 0xa0, 0xa0, 0xe0, 0xa0, 0xe0, 0xea, 0xeb, 0xfa, + 0x0a, 0x0a, 0x09, 0x05, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x0f, 0x15, 0x15, 0x1d, 0x05, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x0d, 0x15, 0x17, 0x1f, 0x03, 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* FAST_TYPE_FRAMES [] = { + crab_run_01, + crab_run_02, + crab_run_03, + crab_run_04, + crab_run_05, + crab_run_06, + }; + static const char* SLOW_TYPE_FRAMES [] = { + crab_idle_01, + crab_idle_02, + crab_idle_03, + crab_idle_04, + crab_idle_05, + crab_idle_06, + }; + + oled_render_anim_frame(FAST_TYPE_FRAMES, SLOW_TYPE_FRAMES, 6); +} \ No newline at end of file diff --git a/keyboards/crkbd/rev1/keymaps/jasper/keymap.c b/keyboards/crkbd/rev1/keymaps/jasper/keymap.c new file mode 100644 index 00000000..a58d7aa2 --- /dev/null +++ b/keyboards/crkbd/rev1/keymaps/jasper/keymap.c @@ -0,0 +1,317 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 + +// Left-hand home row mods +#define HOME_A LGUI_T(KC_A) +#define HOME_S LALT_T(KC_S) +#define HOME_D LSFT_T(KC_D) +#define HOME_F LCTL_T(KC_F) + +// Right-hand home row mods +#define HOME_J LCTL_T(KC_J) +#define HOME_K RSFT_T(KC_K) +#define HOME_L LALT_T(KC_L) +#define HOME_SCLN LGUI_T(KC_SCLN) + +#define HOME 0 +#define NUM 1 +#define NAV 2 +#define SYM 3 +#define FUNC 4 +#define MISC 5 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [HOME] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + LCTL(KC_C), HOME_A, HOME_S, HOME_D, HOME_F, KC_G, KC_H, HOME_J, HOME_K, HOME_L, HOME_SCLN, KC_QUOT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + LCTL(KC_V), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_ESC, LT(NUM, KC_ENT), LT(SYM, KC_TAB), LT(FUNC, KC_BSPC), LT(NAV,KC_SPC) , LT(5,KC_DEL) + //`--------------------------' `--------------------------' + ), + [NUM] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + _______, KC_GRV, KC_7, KC_8, KC_9, XXXXXXX, XXXXXXX, LSFT(KC_QUOT), KC_QUOT, XXXXXXX, KC_PIPE, KC_DEL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, KC_4, KC_5, KC_6, KC_0, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_TILD, KC_1, KC_2, KC_3, XXXXXXX, XXXXXXX, KC_PLUS, KC_EQL, KC_DOT, KC_BSLS, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_ESC, LT(NUM, KC_ENT), LT(SYM, KC_TAB), LT(FUNC, KC_BSPC), _______ , LT(5,KC_DEL) + //`--------------------------' `--------------------------' + ), + + [NAV] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, XXXXXXX, XXXXXXX, KC_END, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_ESC, _______, LT(SYM, KC_TAB), LT(FUNC, KC_BSPC), LT(NAV,KC_SPC) , LT(5,KC_DEL) + //`--------------------------' `--------------------------' + ), + + [FUNC] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + QK_BOOT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RM_TOGG, RM_HUEU, RM_SATU, RM_VALU, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RM_NEXT, RM_HUED, RM_SATD, RM_VALD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_ESC, LT(NUM, KC_ENT), LT(SYM, KC_TAB), _______, LT(NAV,KC_SPC) , LT(5,KC_DEL) + //`--------------------------' `--------------------------' + ), + [SYM] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + _______, XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+-------|---------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, KC_LPRN, KC_RPRN, XXXXXXX, XXXXXXX, KC_UNDS, KC_MINS, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+-------|---------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_ESC, LT(NUM, KC_ENT), _______, LT(FUNC, KC_BSPC), LT(NAV,KC_SPC) , LT(5,KC_DEL) + //`--------------------------' `--------------------------' + ), + [MISC] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, XXXXXXX + //`--------------------------' `--------------------------' + ) +}; + + + +const uint16_t PROGMEM JK_BSPC[] = {HOME_J, HOME_K, COMBO_END}; +const uint16_t PROGMEM UI_CAPSWORD[] = {KC_U, KC_I, COMBO_END}; +// const uint16_t PROGMEM JK_PAREN[] = {HOME_J, HOME_K, COMBO_END}; +// const uint16_t PROGMEM DF_PAREN[] = {HOME_D, HOME_F, COMBO_END}; +// const uint16_t PROGMEM CV_BRACE[] = {KC_C, KC_V, COMBO_END}; +// const uint16_t PROGMEM RIGHT_BRACE[] = {KC_M, KC_COMM, COMBO_END}; +// const uint16_t PROGMEM ER_BRACKET[] = {KC_E, KC_R, COMBO_END}; +// const uint16_t PROGMEM UI_BRACKET[] = {KC_U, KC_I, COMBO_END}; +// const uint16_t PROGMEM COMBO_DASH[] = {HOME_K, HOME_L, COMBO_END}; +// const uint16_t PROGMEM COMBO_UNDS[] = {HOME_S, HOME_D, COMBO_END}; +// const uint16_t PROGMEM COMBO_ESC[] = {KC_W, KC_E, COMBO_END}; + +// Symbol combos... +const uint16_t PROGMEM COMBO_EXCL[] = {KC_Q, HOME_A, COMBO_END}; +const uint16_t PROGMEM COMBO_AT[] = {KC_W, HOME_S, COMBO_END}; +const uint16_t PROGMEM COMBO_HASH[] = {KC_E, HOME_D, COMBO_END}; +const uint16_t PROGMEM COMBO_DLR[] = {KC_R, HOME_F, COMBO_END}; +const uint16_t PROGMEM COMBO_PRC[] = {KC_T, KC_G, COMBO_END}; +const uint16_t PROGMEM COMBO_CARAT[] = {KC_Y, KC_H, COMBO_END}; +const uint16_t PROGMEM COMBO_AMP[] = {KC_U, HOME_J, COMBO_END}; +const uint16_t PROGMEM COMBO_STAR[] = {KC_I, HOME_K, COMBO_END}; + + + +combo_t key_combos[] = { + // COMBO(DF_PAREN, KC_LPRN), + // COMBO(JK_PAREN, KC_RPRN), + // COMBO(CV_BRACE, KC_LCBR), + // COMBO(RIGHT_BRACE, KC_RCBR), + // COMBO(ER_BRACKET, KC_LBRC), + // COMBO(UI_BRACKET, KC_RBRC), + // COMBO(COMBO_DASH, KC_MINS), + // COMBO(COMBO_UNDS, KC_UNDS), + COMBO(UI_CAPSWORD, CW_TOGG), + COMBO(JK_BSPC, KC_BSPC), + // Symbols + COMBO(COMBO_EXCL, KC_EXLM), + COMBO(COMBO_AT, KC_AT), + COMBO(COMBO_HASH, KC_HASH), + COMBO(COMBO_DLR, KC_DLR), + COMBO(COMBO_PRC, KC_PERC), + COMBO(COMBO_CARAT, KC_CIRC), + COMBO(COMBO_AMP, KC_AMPR), + COMBO(COMBO_STAR, KC_ASTR), +}; + + +// void keyboard_post_init_user(void) { +// // Customise these values to desired behaviour +// debug_enable=true; +// debug_matrix=true; +// debug_keyboard=true; +// //debug_mouse=true; +// } + + + +/* KEYBOARD PET START */ +/* settings */ +# define MIN_WALK_SPEED 10 +# define MIN_RUN_SPEED 40 + +/* advanced settings */ +# define ANIM_FRAME_DURATION 170 // how long each frame lasts in ms +# define ANIM_SIZE 96 // number of bytes in array. If you change sprites, minimize for adequate firmware size. max is 1024 + +/* timers */ +uint32_t anim_timer = 0; + +/* current frame */ +uint8_t current_frame = 0; + +/* status variables */ +int current_wpm = 0; +led_t led_usb_state; + +bool isSneaking = false; +bool isJumping = false; +bool showedJump = true; + +/* logic */ +static void render_luna(int LUNA_X, int LUNA_Y) { + /* Sit */ + static const char PROGMEM sit[2][ANIM_SIZE] = {/* 'sit1', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x68, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, + + /* 'sit2', 32x22px */ + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x90, 0x08, 0x18, 0x60, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; + + /* Walk */ + static const char PROGMEM walk[2][ANIM_SIZE] = {/* 'walk1', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x90, 0x90, 0x90, 0xa0, 0xc0, 0x80, 0x80, 0x80, 0x70, 0x08, 0x14, 0x08, 0x90, 0x10, 0x10, 0x08, 0xa4, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0xea, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x03, 0x06, 0x18, 0x20, 0x20, 0x3c, 0x0c, 0x12, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, + + /* 'walk2', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x20, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x28, 0x10, 0x20, 0x20, 0x20, 0x10, 0x48, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x20, 0xf8, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x30, 0xd5, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x02, 0x1c, 0x14, 0x08, 0x10, 0x20, 0x2c, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }}; + + /* Run */ + static const char PROGMEM run[2][ANIM_SIZE] = {/* 'run1', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0xc8, 0xb0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0xc4, 0xa4, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x58, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x04, 0x04, 0x04, 0x04, 0x02, 0x03, 0x02, 0x01, 0x01, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, + }, + + /* 'run2', 32x22px */ + { + 0x00, 0x00, 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x78, 0x28, 0x08, 0x10, 0x20, 0x30, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xb0, 0x50, 0x55, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x1e, 0x20, 0x20, 0x18, 0x0c, 0x14, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }}; + + /* Bark */ + static const char PROGMEM bark[2][ANIM_SIZE] = {/* 'bark1', 32x22px */ + { + 0x00, 0xc0, 0x20, 0x10, 0xd0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, + + /* 'bark2', 32x22px */ + { + 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x2c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x20, 0x4a, 0x09, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }}; + + /* Sneak */ + static const char PROGMEM sneak[2][ANIM_SIZE] = {/* 'sneak1', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x21, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x04, 0x04, 0x04, 0x03, 0x01, 0x00, 0x00, 0x09, 0x01, 0x80, 0x80, 0xab, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x02, 0x06, 0x18, 0x20, 0x20, 0x38, 0x08, 0x10, 0x18, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, + }, + + /* 'sneak2', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xa0, 0x20, 0x40, 0x80, 0xc0, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x41, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x40, 0x55, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x04, 0x18, 0x10, 0x08, 0x10, 0x20, 0x28, 0x34, 0x06, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + }}; + + /* animation */ + void animate_luna(void) { + /* jump */ + if (isJumping || !showedJump) { + /* clear */ + oled_set_cursor(LUNA_X, LUNA_Y + 2); + oled_write(" ", false); + + oled_set_cursor(LUNA_X, LUNA_Y - 1); + + showedJump = true; + } else { + /* clear */ + oled_set_cursor(LUNA_X, LUNA_Y - 1); + oled_write(" ", false); + + oled_set_cursor(LUNA_X, LUNA_Y); + } + + /* switch frame */ + current_frame = (current_frame + 1) % 2; + + /* current status */ + if (led_usb_state.caps_lock) { + oled_write_raw_P(bark[current_frame], ANIM_SIZE); + + } else if (isSneaking) { + oled_write_raw_P(sneak[current_frame], ANIM_SIZE); + + } else if (current_wpm <= MIN_WALK_SPEED) { + oled_write_raw_P(sit[current_frame], ANIM_SIZE); + + } else if (current_wpm <= MIN_RUN_SPEED) { + oled_write_raw_P(walk[current_frame], ANIM_SIZE); + + } else { + oled_write_raw_P(run[current_frame], ANIM_SIZE); + } + } + +# if OLED_TIMEOUT > 0 + /* the animation prevents the normal timeout from occuring */ + if (last_input_activity_elapsed() > OLED_TIMEOUT && last_led_activity_elapsed() > OLED_TIMEOUT) { + oled_off(); + return; + } else { + oled_on(); + } +# endif + + /* animation timer */ + if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animate_luna(); + } +} + +/* KEYBOARD PET END */ + +bool oled_task_user(void) { + /* KEYBOARD PET VARIABLES START */ + + current_wpm = get_current_wpm(); + led_usb_state = host_keyboard_led_state(); + + render_luna(0, 13); + return false; +} diff --git a/keyboards/crkbd/rev1/keymaps/jasper/keymap.json b/keyboards/crkbd/rev1/keymaps/jasper/keymap.json new file mode 100644 index 00000000..7532ac97 --- /dev/null +++ b/keyboards/crkbd/rev1/keymaps/jasper/keymap.json @@ -0,0 +1,3 @@ +{ + "converter": "rp2040_ce" +} diff --git a/keyboards/crkbd/rev1/keymaps/jasper/rules.mk b/keyboards/crkbd/rev1/keymaps/jasper/rules.mk new file mode 100644 index 00000000..3c8d1e68 --- /dev/null +++ b/keyboards/crkbd/rev1/keymaps/jasper/rules.mk @@ -0,0 +1,7 @@ +# CONSOLE_ENABLE = yes + +COMBO_ENABLE = yes +WPM_ENABLE = yes # Enable word per minute counter +OLED_ENABLE = yes # Enable OLEDs +CAPS_WORD_ENABLE = yes + diff --git a/qmk.json b/qmk.json index 3afc389f..448bb73d 100644 --- a/qmk.json +++ b/qmk.json @@ -1,4 +1,6 @@ { - "userspace_version": "1.0", - "build_targets": [] + "userspace_version": "1.1", + "build_targets": [ + ["crkbd/rev1", "jasper"] + ] } \ No newline at end of file