]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - docs/hand_wire.md
Usbasploader bootloader option addition (#6304)
[qmk_firmware.git] / docs / hand_wire.md
index b1ad5dd693994960c3f90555d23361178089cdc3..25db9341b886c8e95ef80df3c2a8e005c79c67ae 100644 (file)
@@ -133,7 +133,7 @@ Starting at the top-left switch, place the diode (with tweezers if you have them
      │o
     ┌┴┐         o
     │ │    O
-    ├─┤      
+    ├─┤
     └┬┘
      └─────────────
 ```
@@ -142,7 +142,7 @@ Letting the diode rest, grab your solder, and touch both it and the soldering ir
 
 The smoke that the rosin releases is harmful, so be careful not to breath it or get it in your eyes/face.
 
-After soldering things in place, it may be helpful to blow on the joint to push the smoke away from your face, and cool the solder quicker. You should see the solder develop a matte (not shiney) surface as it solidifies. Keep in mind that it will still be very hot afterwards, and will take a couple minutes to be cool to touch. Blow on it will accelerate this process.
+After soldering things in place, it may be helpful to blow on the joint to push the smoke away from your face, and cool the solder quicker. You should see the solder develop a matte (not shiny) surface as it solidifies. Keep in mind that it will still be very hot afterwards, and will take a couple minutes to be cool to touch. Blow on it will accelerate this process.
 
 When the first diode is complete, the next one will need to be soldered to both the keyswitch, and the previous diode at the new elbow. That will look something like this:
 
@@ -150,7 +150,7 @@ When the first diode is complete, the next one will need to be soldered to both
      │o               │o
     ┌┴┐         o    ┌┴┐         o
     │ │    O         │ │    O
-    ├─┤              ├─┤      
+    ├─┤              ├─┤
     └┬┘              └┬┘
      └────────────────┴─────────────
 ```
@@ -185,21 +185,30 @@ When you're done with the columns, start with the rows in the same process, from
 
 As you move along, be sure that the Teensy is staying in place - recutting and soldering the wires is a pain!
 
+## Additional guides
+
+If you're more of a visual learner, or want some additional tips and something more to follow along, these two visual step by step guides may be helpful:
+
+- [BrownFox's step by step guide](https://deskthority.net/viewtopic.php?f=7&t=6050)
+- [Cribbit's modern hand wiring guide](https://geekhack.org/index.php?topic=87689.0)
+
 # Getting Some Basic Firmware Set Up
 
 From here, you should have a working keyboard once you program a firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch.
 
-To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/).
+To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/) (paid) or [Visual Studio Code](https://code.visualstudio.com) (free).
 
-The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `<project_name>` replaced by the name of your project - it'll need to be different from any other project in the `keyboards/` folder:
+The first thing we're going to do is create a new keyboard. In your terminal, run this command, which will ask you some questions and generate a basic keyboard project:
 
 ```
-    util/new_project.sh <project_name>
+./util/new_keyboard.sh
 ```
 
 You'll want to navigate to the `keyboards/<project_name>/` folder by typing, like the print-out from the script specifies:
 
-    cd keyboards/<project_name>
+```
+cd keyboards/<project_name>
+```
 
 ### `config.h`
 
@@ -209,7 +218,7 @@ Farther down are `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`. Change their definitio
 
 ### `<project_name>.h`
 
-The next file you'll want to look at is `<project_name>.h`. You're going to want to rewrite the `KEYMAP` definition - the format and syntax here is extremely important, so pay attention to how things are setup. The first half of the definition are considered the arguments - this is the format that you'll be following in your keymap later on, so you'll want to have as many k*xy* variables here as you do keys. The second half is the part that the firmware actually looks at, and will contain gaps depending on how you wired your matrix.
+The next file you'll want to look at is `<project_name>.h`. You're going to want to rewrite the `LAYOUT` definition - the format and syntax here is extremely important, so pay attention to how things are setup. The first half of the definition are considered the arguments - this is the format that you'll be following in your keymap later on, so you'll want to have as many k*xy* variables here as you do keys. The second half is the part that the firmware actually looks at, and will contain gaps depending on how you wired your matrix.
 
 We'll dive into how this will work with the following example. Say we have a keyboard like this:
 
@@ -231,10 +240,10 @@ This can be described by saying the top row is 3 1u keys, and the bottom row is
     └─────┴─────┘
 ```
 
-The middle column is unused on the bottom row in this example. Our `KEYMAP` definition would look like this:
+The middle column is unused on the bottom row in this example. Our `LAYOUT` definition would look like this:
 
 ```
-    #define KEYMAP( \
+    #define LAYOUT( \
         k00, k01, k02, \
           k10,  k11,   \
     ) \
@@ -256,10 +265,10 @@ Let's say that instead, we wired our keyboard like this (a fair thing to do):
     └─────┴─────┘
 ```
 
-This would require our `KEYMAP` definition to look like this:
+This would require our `LAYOUT` definition to look like this:
 
 ```
-    #define KEYMAP( \
+    #define LAYOUT( \
         k00, k01, k02, \
           k10,  k11,   \
     ) \
@@ -269,7 +278,7 @@ This would require our `KEYMAP` definition to look like this:
     }
 ```
 
-Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `KEYMAP` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it.
+Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `LAYOUT` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it.
 
 ### `keymaps/<variant>/default.c`
 
@@ -291,7 +300,7 @@ This can be accomplished by using the following `keymaps` definition:
 
 ```
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    [0] = KEYMAP( /* Base */
+    [0] = LAYOUT( /* Base */
       KC_A,  KC_1,  KC_H, \
         KC_TAB,  KC_SPC   \
     ),
@@ -300,7 +309,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 
 Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [Keycodes](keycodes.md) - there are also a lot of aliases to condense your keymap file.
 
-It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring.
+It's also important to use the `LAYOUT` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring.
 
 ## Compiling Your Firmware
 
@@ -319,7 +328,7 @@ Carefully flip your keyboard over, open up a new text document, and try typing -
 2. Check the solder joints on the diode - if the diode is loose, part of your row may register, while the other may not.
 3. Check the solder joints on the columns - if your column wiring is loose, part or all of the column may not work.
 4. Check the solder joints on both sides of the wires going to/from the Teensy - the wires need to be fully soldered and connect to both sides.
-5. Check the <project_name>.h file for errors and incorrectly placed `KC_NO`s - if you're unsure where they should be, instead duplicate a k*xy* variable.
+5. Check the `<project_name>.h` file for errors and incorrectly placed `KC_NO`s - if you're unsure where they should be, instead duplicate a k*xy* variable.
 6. Check to make sure you actually compiled the firmware and flashed the Teensy correctly. Unless you got error messages in the terminal, or a pop-up during flashing, you probably did everything correctly.
 
 If you've done all of these things, keep in mind that sometimes you might have had multiple things affecting the keyswitch, so it doesn't hurt to test the keyswitch by shorting it out at the end.
@@ -328,4 +337,4 @@ If you've done all of these things, keep in mind that sometimes you might have h
 
 Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out.
 
-There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different project (Planck, Clueboard, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)
+There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different keyboards (Planck, Clueboard, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)