gkubed / QMK_Teensy_2.0_Tutorial

Basic steps necessary to deploy firmware on a Teensy 2.0
MIT License
9 stars 0 forks source link

QMK_Teensy_2.0_Tutorial

Basic steps necessary to put firmware on a Teensy 2.0

Who this guide is for

This guide if for people who have finished the assembly process of their mechanical keyboards and are at the stage where you must put firmware on the Teensy. This will be written in the perspective of someone with a 4x12 grid layout keyboard, although any layout should be able to make use of this guide.

Why did you write this when there's so many guides out there?

I wrote this guide because between the several tutorials out there, there's many inconsistencies and interlinking between guides. The goal of this tutorial is to have you up and running without two dozen tabs open afterwards. Also, I just wanted to type on my planck. That's the real reason.

What you'll need

There are several different approaches to getting firmware onto your Teensy 2.0. My approach is just one of many. If you don't like it, that's totally okay! There's many other tutorials out there.

On Windows

  1. Teensyloader - This is what we'll use to put the firmware onto your keyboard.
  2. VirtualBox - We'll set up an environment here using an Ubuntu disk image, where we'll be able to make our firmware without the headaches of trying to treat Windows like Linux.
  3. Ubuntu 16.04 LTS ISO file - which Linux distribution you use is relatively trivial. If you're familiar with other deb-package based environment, feel free to use one of your choice. Don't worry about installing this yet, just get the .ISO file.
  4. A text editor of your choice. That's it!

On Mac

// TODO

On Linux

  1. Teensyloader - This is what we'll use to put the firmware onto your keyboard.

Getting the files

Download Jack Humbert's fork of tmk_firmware. Unzip this, and remember where you leave it.

Creating your Virtual Machine environment

This may look long and intimidating. Don't be scared - I just included every detail I could in hopes that you won't get stuck.

You're finally ready!

This is a pretty big package, and we're barely going to scratch the surface. Enter the keyboard directory. You'll see many different titled keyboards. In this tutorial, we'll use planck, although the process should be similar for any layout.

config.h

The first file we'll mess with is the config.h file of whatever directory you've chosen. We're going to change two lines - the COLS and ROWS definitions.

#define COLS (int []){ C7, C6, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 }
#define ROWS (int []){ B3, B2, B1, B0 }

Above is my configuration. Most likely, yours is different. These codes represent the pins used on my Teensy 2.0 for each row and column. The pinout numbers are shown in the image below.

Teensy 2.0 pinouts

Remember that when you have your keyboard upside down...that it's upside down. Pinout rows are listed from top to bottom, and columns are listed left to right. If you have a different number of rows or columns than I do, scroll up and make sure your MATRIX_ROWS and MATRIX_COLS values are correct.

Feel free to spend some time getting to know this file for the other configuration it allows.

Your own firmware

Until I find the time to write this section in my own tongue, this guide should be beneficial to look at.