geekhack
geekhack Community => Off Topic => Topic started by: Davsmith4 on Fri, 20 March 2015, 19:13:37
-
So in my epic quest to make a keyboard (no hyperbole there :P) I have figured out everything but how to program the Teensy. Does anyone know of any good guides that go over it as well as the IDE I will have to use?
-
Do you want to write your own firmware or just add your matrix to an already available one? If you're happy to not do your own the programming process is as simple as:
Plug in USB cable
Run Teensy Loader (http://www.pjrc.com/teensy/loader.html)
Choose firmware hex file
Press the button on the Teensy
Press button in Teensy loader
For a custom matrix your firmware choices are TMK (https://geekhack.org/index.php?topic=41989.0) or Soarer's (https://geekhack.org/index.php?topic=50437.0), Soarer's is easier but Soarer is AWOL, while TMK has more features and is more popular lately - have a read :)
If you want to write your own firmware you need someone else's help...
-
Do you want to write your own firmware or just add your matrix to an already available one? If you're happy to not do your own the programming process is as simple as:
Plug in USB cable
Run Teensy Loader (http://www.pjrc.com/teensy/loader.html)
Choose firmware hex file
Press the button on the Teensy
Press button in Teensy loader
For a custom matrix your firmware choices are TMK (https://geekhack.org/index.php?topic=41989.0) or Soarer's (https://geekhack.org/index.php?topic=50437.0), Soarer's is easier but Soarer is AWOL, while TMK has more features and is more popular lately - have a read :)
If you want to write your own firmware you need someone else's help...
Thanks for the info! As i would like to at the very least know the process for writing my own firmware could to direct me to a source where I could learn?
-
As i would like to at the very least know the process for writing my own firmware could to direct me to a source where I could learn?
I think that those who have written firmwares have read and experimented a lot on their own. There are a few threads where firmware writers discuss different techniques.
Going with TMK or Soarer's firmwares are the easiest, most popular routes that provide lots of features from the start with the least amount of programming. Soarer has not published his source code, and the firmware has to learn the matrix through configuration files.
I run my own firmware on a keyboard. I started by modifying bpiphany's AVR-keyboard (https://github.com/BathroomEpiphanies/AVR-Keyboard) code, but now all in my source tree is my code.
AVR-Keyboard is quite simple: one source file for the main routines and a couple of source files that are specific to the keyboard matrix and layout, but no special features whatsoever.
The USB routines are from PJRC who makes the Teensy: they don't support NKRO, media or power keys or even Suspend mode, but they work. It compiles under Linux with avr-gcc and a Makefile.
All of the above are for the Teensy 2.0 (and the Teensy++ 2.0) that use a Atmel 8-bit AVR microcontroller. For the Teensy boards that use Freescale ARM Cortex-based controllers there is not as much existing source code available.
HaaTa's Kiibohd controller (https://github.com/kiibohd/controller) firmware supports the Teensy 3.0 and 3.1.
-
You could also look at the teensy2 branch (https://github.com/technomancy/atreus-firmware/tree/teensy2) of the Atreus (http://atreus.technomancy.us/) firmware as a starting point. It's pretty small and easy to follow along.