Use the schematic on my Github as a reference when soldering.
I choose to hand solder the PCB since I don't have the equipment for hot air soldering. If you choose to solder the PCB by hand, be sure to use plenty of flux and a good pair of tweezer.
I used 3 soldering iron tips:
- Pencil tip for THT parts
- Conical tip for SMD parts
- Hoof tip for drag soldering the Atmega32u4 (follow this video if you've never drag soldered before)
The SMD components and the rotary encoder should be soldered on first, then place the PCB inside of the 3D printed case and insert the key switch through the cutouts, the case should be sandwiched between the key switches and the PCB.
3Burning the Arduino Bootloader
In order to program Knobo via the usb port, the Arduino bootloader must first be burned onto the Atmega32u4. I used an Arduino Uno as the ISP programmer and connected to the ISP connector on the PCB. The Arduino website has a great tutorial on how to do this, just make sure that the board type is Arduino Leonardo when burning the bootloader.
Download the code template from my Github.
Install the following libraries:
The code uses the HID project library by NicoHood to send keypresses to the computer.
In the code template, I've commented the corresponding line to add your code for the macros.
A macro is consist of the following functions:
- Keyboard.press(); // simulates a key press
- Keyboard.release(); // releases a key press
- Keyboard.releaseAll(); // releases all keypress, it's always a good idea to add this to the end of your macro
- Keyboard.print(""); // types out a series of letters
Here is a macro for opening my website in chrome: