Skip to content

Instantly share code, notes, and snippets.

@benwtr
Last active December 16, 2016 20:39
Show Gist options
  • Save benwtr/c4a240d9ec5f04d92560ce2a04abba52 to your computer and use it in GitHub Desktop.
Save benwtr/c4a240d9ec5f04d92560ce2a04abba52 to your computer and use it in GitHub Desktop.
Changing the Infinity Ergodox logo

Changing ergodox infinity logo

Assuming Ubuntu16.04 but any OS will do if you have python3 and PIL installed and can satisfy all the required dependencies to build the firmware.

Create a keyboard layout and download a firmware https://input.club/configurator-ergodox/

Unzip the firmware archive and have the .kll files ready

Create a logo, save it as a black on white 128x32 .bmp

sudo apt-get install python3-pil cmake git build-essential ctags dfu-util arm-none-eabi-gcc
git clone https://github.com/kiibohd/controller kiibohd_controller
cd kiibohd_controller
cp -r Scan/Infinity_Ergodox Scan/Infinity_Ergodox-CustomLogo
cp Keyboards/ergodox.bash Keyboards/ergodox-custom.bash
python3 Scan/STLcd/bitmap2Struct.py ./path/to/logo.bmp

Copy the hex output for your logo, edit kiibohd_controller/Scan/Infinity_Ergodox-CustomLogo/scancode_map.kll and paste the hex logo in as the new value of STLcdDefaultImage eg:

STLcdDefaultImage = "
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf0, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x07, 0x0f, 0x3f, 0xfe, 0xfc, 0xf8, 0xf8, 0xf0, 0xe0, 0xe0, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xf0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x07, 0x1f, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xf3, 0xe0, 0xe0, 0xf8, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x0f, 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, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x7e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfc, 0xfc, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x7f, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
";

Edit kiibohd_controller/Keyboards/ergodox-custom.bash: Change ScanModule to Infinity_Ergodox-CustomLogo Update DefaultMap and PartialMaps to the names of the kll files from the firmware archive without the kll extension:

DefaultMap="MDErgo1-Default-0 lcdFuncMap"
PartialMaps[1]="MDErgo1-Default-1 lcdFuncMap"
PartialMaps[2]="MDErgo1-Default-2 lcdFuncMap"

Run this once to git clone the kll repo and set up the build environment. If it complains about missing dependencies you should install them.

cd Keyboards
bash ergodox-custom.bash

Copy the kll files from the firmware archive to kiibohd_controller/kll/layouts/

cp MDErgo1-Default-*.kll kiibohd_controller/kll/layouts/

Run the build again:

cd kiibohd_controller/Keyboards
bash ergodox-custom.bash

You should now have 2 .bin files to flash onto each half of your ergodox infinity. Follow the usual ergodox infinity flashing procedure.

Notes

This was mostly based on http://asciipr0n.net/ergodox-infinity-logo/ but those instructions are out of date and no longer apply due to changes in the https://github.com/kiibohd/controller/ repo.

http://www.piskelapp.com/ works well for making logos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment