qmk-keychron-q3-colemak-dh/keyboards/terrazzo
James Young c66df16644
2020 November 28 Breaking Changes Update (#11053)
* Branch point for 2020 November 28 Breaking Change                                                

* Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183)                                           

* Add support for soft serial to ATmega32U2 (#10204)                                               

* Change MIDI velocity implementation to allow direct control of velocity value (#9940)            

* Add ability to build a subset of all keyboards based on platform.                                

* Actually use eeprom_driver_init().                                                               

* Make bootloader_jump weak for ChibiOS. (#10417)                                                  

* Joystick 16-bit support (#10439)                                                                 

* Per-encoder resolutions (#10259)                                                                 

* Share button state from mousekey to pointing_device (#10179)                                     

* Add hotfix for chibios keyboards not wake (#10088)                                               

* Add advanced/efficient RGB Matrix Indicators (#8564)                                             

* Naming change.                                                                                   

* Support for STM32 GPIOF,G,H,I,J,K (#10206)                                                       

* Add milc as a dependency and remove the installed milc (#10563)                                  

* ChibiOS upgrade: early init conversions (#10214)                                                 

* ChibiOS upgrade: configuration file migrator (#9952)                                             

* Haptic and solenoid cleanup (#9700)                                                              

* XD75 cleanup (#10524)                                                                            

* OLED display update interval support (#10388)                                                    

* Add definition based on currently-selected serial driver. (#10716)                               

* New feature: Retro Tapping per key (#10622)                                                      

* Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638)             

* Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530)

* Rescale both ChibiOS and AVR backlighting.                                                       

* Reduce Helix keyboard build variation (#8669)                                                    

* Minor change to behavior allowing display updates to continue between task ticks (#10750)        

* Some GPIO manipulations in matrix.c change to atomic. (#10491)                                   

* qmk cformat (#10767)                                                                             

* [Keyboard] Update the Speedo firmware for v3.0 (#10657)                                          

* Maartenwut/Maarten namechange to evyd13/Evy (#10274)                                             

* [quantum] combine repeated lines of code (#10837)                                                

* Add step sequencer feature (#9703)                                                               

* aeboards/ext65 refactor (#10820)                                                                 

* Refactor xelus/dawn60 for Rev2 later (#10584)                                                    

* add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824)                                 

* [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549)                                    

* update chibios os usb for the otg driver (#8893)                                                 

* Remove HD44780 References, Part 4 (#10735)                                                       

* [Keyboard] Add Valor FRL TKL (+refactor) (#10512)                                                

* Fix cursor position bug in oled_write_raw functions (#10800)                                     

* Fixup version.h writing when using SKIP_VERSION=yes (#10972)                                     

* Allow for certain code in the codebase assuming length of string. (#10974)                       

* Add AT90USB support for serial.c (#10706)                                                        

* Auto shift: support repeats and early registration (#9826)                                       

* Rename ledmatrix.h to match .c file (#7949)                                                      

* Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231)                                        

* Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840)                                        

* Merge point for 2020 Nov 28 Breaking Change
2020-11-28 12:02:18 -08:00
..
keymaps
terrazzo_effects
config.h
info.json
readme.md Rename keyboard-level readmes to lower-case (#10759) 2020-10-25 15:23:42 +00:00
rules.mk 2020 November 28 Breaking Changes Update (#11053) 2020-11-28 12:02:18 -08:00
terrazzo.c
terrazzo.h

Terrazzo

Terrazzo

Terrazzo is a 40% pro micro keyboard kit with a fun, hot-swapable LED module. It is offered in both staggered and ortholinear variations, each with multiple layout options. A left hand macro column has 4 positions for switches or rotary encoders.

Extended layout options and multiple encoder support will require use of an Elite-C controller. Key switch support is MX soldered only.

  • Keyboard Maintainer: MsMustard, Anne Demey
  • Hardware Supported: Terrazzo v1 & v2 PCB in staggered and ortholinear

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

  • make terrazzo:default Split spacebar staggered layout
  • make terrazzo:ortho 2 x 2u spacebar ortho layout
  • make terrazzo:ortho_mit 2u spacebar ortho layout
  • make terrazzo:ortho_all All 1u ortho layout

See the build environment setup and the make instructions for more information. Brand new to QMK? Start with our Complete Newbs Guide.

Parts List

Custom Keycodes

Terrazzo has several custom keycodes for LED control.

Key Description
TZ_NXT Next Animation
TZ_PRV Previous Animation
TZ_OFF LED Off

LED Animations

LED animations for Terrazzo are reactive to keyboard input. Each key press or encoder turn increments an internal counter, looping through the number of individual LEDs.

This counter (terrazzo_led_index) is used as a seed for the animation functions, along with a boolean indicating the direction. Turning the encoder counter-clockwise, or pressing backspace will decrement the counter, allowing for animations to reverse or display alternative frames.

The current animations are:

  • DINO: It's like your internet went out
  • DOT: Just a single led at a time, for debugging
  • HEART: Love you too
  • OUTRUN: Driving into the sunset
  • PAC_DUDE: Vintage arcade fun
  • STRIPES: Just a nice gradient
  • WPM_CHART: 2 digit readout with lights indicating speed, each pixel = 2 wpm

Not all animations are enabled by default. You can enable or disable animations in the config.h file to limit firmware size.

// #define DISABLE_TERRAZZO_EFFECT_STRIPES
// #define DISABLE_TERRAZZO_EFFECT_DINO
// #define DISABLE_TERRAZZO_EFFECT_OUTRUN
#define DISABLE_TERRAZZO_EFFECT_PAC_DUDE
#define DISABLE_TERRAZZO_EFFECT_HEART
// #define DISABLE_TERRAZZO_EFFECT_WPM_CHART
#define DISABLE_TERRAZZO_EFFECT_DOT

Microcontroller Support

Terrazzo is designed for use with a Pro Micro (or compatible, like Bit-C), or an Elite-C. The extra pinouts of an Elite-C are required for the ortho MIT and ALL layouts and multiple encoders. By default the firmware is set up for an Elite-C. For a Pro Micro some changes to config.h are needed.

Change number of rows from 9 to 8.

#define MATRIX_ROWS 8

Change pinouts, Pro Micro does not have the "F0" pin.

#define MATRIX_ROW_PINS { D2, D7, E6, B4, B5, B6, B2, B3 }

Set encoder to just top or bottom position.

#define ENCODERS_PAD_A { C6 }
#define ENCODERS_PAD_B { D4 }

Encoder Setup

Terrazzo has 4 positions for encoders in the left-hand column. Up to 3 may be used at a time, but this requires the extra pins of an Elite-C. Please refer to config.h for examples of pin configurations.

The default keymaps are setup for one encoder. Encoders can change behavior based on the current layer. Here, on the "NAV" layer, the encoder changes volume instead of scrolling.

void encoder_update_user(uint8_t index, bool clockwise) {
    terrazzo_scroll_pixel(clockwise);
    switch(get_highest_layer(layer_state)) {
      case _NAV:
        // Change volume when on nav layer
        clockwise ? tap_code(KC_AUDIO_VOL_UP) : tap_code(KC_AUDIO_VOL_DOWN);
        break;
      default:
        // Default encoder behavior of Page Up and Down
        clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP);
        break;
    }   
}

If using multiple encoders, the index param can be used to distingish which is providing input.

void encoder_update_user(uint8_t index, bool clockwise) {
    terrazzo_scroll_pixel(clockwise);
    switch(index) {
      case 0:
        clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP);
        break;
      case 1:
        clockwise ? tap_code(KC_AUDIO_VOL_UP) : tap_code(KC_AUDIO_VOL_DOWN);
        break;        
    }
}