# Navi10 MacroPad with KB2040 and KMK CircuitPython keyboard firmware

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/107/776/medium800/circuitpython_20191206_152537a.jpg?1641933147)

###### Image credit: [keyhive.xyz](https://keyhive.xyz/shop/navi10)
In this guide, you'll learn how to set up your Navi10 macropad to use KMK firmware. You'll use the Navi10, designed by [/u/emdarcher](https://www.reddit.com/user/emdarcher), and the new Adafruit KB2040, to build a macropad that you'll put KMK firmware on and will also learn how to remap it and create your own configuration.

**What is KMK?**

> KMK is a feature-rich and beginner-friendly firmware for computer keyboards written and configured in&nbsp;[CircuitPython](https://github.com/adafruit/circuitpython).

**What is the Navi10?**

> Navi10 is a simple PCB kit meant to help people that miss their navigation cluster or just want a simple macropad.
> 
> The PCB comes with a built in diode bender and written instructions on how to build it.
> 
> Designed by /u/emdarcher

![](https://cdn-learn.adafruit.com/assets/assets/000/107/729/medium800/circuitpython_IMG_1916.jpg?1641839373)

## Parts
[Navi10 Kit](https://keyhive.xyz/shop/navi10)

Navi10 is a simple PCB kit meant to help people that miss their navigation cluster or just want a simple macropad.

**$15.00**

![circuitpython_20191206_152825.jpg](https://cdn-learn.adafruit.com/assets/assets/000/107/727/medium640/circuitpython_20191206_152825.jpg?1641838992)

Featured
### Adafruit KB2040 - RP2040 Kee Boar Driver

[Adafruit KB2040 - RP2040 Kee Boar Driver](https://www.adafruit.com/product/5302)
A wild Kee Boar appears! It’s a shiny **KB2040**! An Arduino Pro Micro-shaped board for Keebs with RP2040. (#keeblife 4 evah) A lot of folks like using Adafruit parts for their Keeb builds – but with the ItsyBitsy not being pin-compatible with the Pro Micro pinout, it...

In Stock
[Buy Now](https://www.adafruit.com/product/5302)
[Related Guides to the Product](https://learn.adafruit.com/products/5302/guides)
![Angled shot of short black microcontroller.](https://cdn-shop.adafruit.com/640x480/5302-07.jpg)

Featured
### USB Type A to Type C Cable - approx 1 meter / 3 ft long

[USB Type A to Type C Cable - approx 1 meter / 3 ft long](https://www.adafruit.com/product/4474)
As technology changes and adapts, so does Adafruit. This&nbsp;&nbsp; **USB Type A to Type C** cable will help you with the transition to USB C, even if you're still totin' around a USB Type A hub, computer or laptop.

USB C is the latest industry-standard connector for...

In Stock
[Buy Now](https://www.adafruit.com/product/4474)
[Related Guides to the Product](https://learn.adafruit.com/products/4474/guides)
![Angled shot of a coiled black, USB-C to USB-A cable.](https://cdn-shop.adafruit.com/640x480/4474-02.jpg)

# Navi10 MacroPad with KB2040 and KMK CircuitPython keyboard firmware

## Installing CircuitPython

[CircuitPython](https://github.com/adafruit/circuitpython) is a derivative of [MicroPython](https://micropython.org) designed to simplify experimentation and education on low-cost microcontrollers. It makes it easier than ever to get prototyping by requiring no upfront desktop software downloads. Simply copy and edit files on the **CIRCUITPY** drive to iterate.

## CircuitPython Quickstart

Follow this step-by-step to quickly get CircuitPython running on your board.

[Download the latest version of CircuitPython for this board via circuitpython.org](https://circuitpython.org/board/adafruit_kb2040/)
 **Click the link above to download the latest CircuitPython UF2 file.**

Save it wherever is convenient for you.

![install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/655/medium640/install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg?1618943202)

![](https://cdn-learn.adafruit.com/assets/assets/000/108/852/medium800/adafruit_products_KeeBoar_boot_reset.jpg?1644515196)

To enter the bootloader, hold down the **BOOT/**** BOOTSEL button**(highlighted in red above), and while continuing to hold it (don't let go!), press and release the**reset button**(highlighted in red or blue above).&nbsp;**Continue to hold the BOOT/BOOTSEL button until the RPI-RP2 drive appears!**

If the drive does not appear, release all the buttons, and then repeat the process above.

You can also start with your board unplugged from USB, press and hold the BOOTSEL button (highlighted in red above), continue to hold it while plugging it into USB, and wait for the drive to appear before releasing the button.

A lot of people end up using charge-only USB cables and it is very frustrating! **Make sure you have a USB cable you know is good for data sync.**

You will see a new disk drive appear called **RPI-RP2**.

&nbsp;

Drag the **adafruit\_circuitpython\_etc.uf2** file to **RPI-RP2.**

![install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/656/medium640/install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg?1618943666)

![install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/657/medium640/install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg?1618943674)

The **RPI-RP2** drive will disappear and a new disk drive called **CIRCUITPY** will appear.

That's it, you're done! :)

![install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/658/medium640/install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg?1618943864)

## Safe Mode

You want to edit your **code.py** or modify the files on your **CIRCUITPY** drive, but find that you can't. Perhaps your board has gotten into a state where **CIRCUITPY** is read-only. You may have turned off the **CIRCUITPY** drive altogether. Whatever the reason, safe mode can help.

Safe mode in CircuitPython does not run any user code on startup, and disables auto-reload. This means a few things. First, safe mode _bypasses any code in_ **boot.py** (where you can set **CIRCUITPY** read-only or turn it off completely). Second, _it does not run the code in_ **code.py**. And finally, _it does not automatically soft-reload when data is written to the_ **CIRCUITPY** _drive_.

Therefore, whatever you may have done to put your board in a non-interactive state, safe mode gives you the opportunity to correct it without losing all of the data on the **CIRCUITPY** drive.

### Entering Safe Mode
To enter safe mode when using CircuitPython, plug in your board or hit reset (highlighted in red above). Immediately after the board starts up or resets, it waits 1000ms. On some boards, the onboard status LED (highlighted in green above) will blink yellow during that time. If you press reset during that 1000ms, the board will start up in safe mode. It can be difficult to react to the yellow LED, so you may want to think of it simply as a slow double click of the reset button. (Remember, a fast double click of reset enters the bootloader.)

### In Safe Mode

If you successfully enter safe mode on CircuitPython, the LED will intermittently blink yellow three times.

If you connect to the serial console, you'll find the following message.

```terminal
Auto-reload is off.
Running in safe mode! Not running saved code.

CircuitPython is in safe mode because you pressed the reset button during boot. Press again to exit safe mode.

Press any key to enter the REPL. Use CTRL-D to reload.
```

You can now edit the contents of the **CIRCUITPY** drive. Remember, _your code will not run until you press the reset button, or unplug and plug in your board, to get out of safe mode._

## Flash Resetting UF2

If your board ever gets into a really _weird_ state and CIRCUITPY doesn't show up as a disk drive after installing CircuitPython, try loading this 'nuke' UF2 to RPI-RP2. which will do a 'deep clean' on your Flash Memory. **You will lose all the files on the board** , but at least you'll be able to revive it! After loading this UF2, follow the steps above to re-install CircuitPython.

[Download flash erasing "nuke" UF2](https://cdn-learn.adafruit.com/assets/assets/000/145/511/original/nuke_universal.uf2?1786537992)
# Navi10 MacroPad with KB2040 and KMK CircuitPython keyboard firmware

## Assembly

The bottom plate has most of the assembly instructions on it, but since this guide is using the KB2040, the instructions have been slightly edited.

![](https://cdn-learn.adafruit.com/assets/assets/000/107/685/medium800/circuitpython_IMG_1852.jpg?1641479853)

Modified assembly instructions:

_Diode and Resistor Lead Bending Tool:_

_Center your component in the cutout rectangle and align leads with the notches. Then, whiile holding the component leads against the PCB, bend the lead ends into the notches to an angle of 90°._

_BOM:  
U0: [Adafruit KB2040]  
J0, J1: 12 Pin Headers (usually come with Pro Micro)  
D0-D9: Switching Diodes (ex. 1N4148)  
D10: 3mm LED  
R0: 1k Ohm Resistor  
K0-K9: Cherry MX compatible or Alps Keyswitches  
12x M2 screws  
6x M2 spacers_

_Build Steps:_

_1. Solder the Diodes and Resistor:  
- Use the Lead Bending Tool above to bend the leads  
- Solder the Diodes with the marked side of the diode oriented with the markings on the silkscreen._

_2. Solder the LED:  
- Anode (positive) lead is usually longer than the Cathode (negative) lead.  
- Positive side is marked with a '+' on bottom of the PCB, make sure to solder the Anode (positive) lead in that hole._

_3. Solder the [KB2040] Headers:  
- On bottom side of PCB, place headers in the correct rows (middle for Micro USB [or USB-C on KB2040], outer for Mini USB model)  
- Hold these in place while flipping over the PCB, and place on a flat surface, keeping them as straight as possible while soldering. Placing the [KB2040] on them loosely can help with alignment.  
- Solder the header pins to the pads on the top side of the PCB._

_4. Solder the Switches:  
- Place the Switches in their locations on the top of the PCB.  
- Flip over the PCB and solder the Switch leads to the pads on the back of the PCB.  
- After soldering, clip the leads on K1 and K4 shorter to prevent them from touching the Pro Micro._

_5. Solder the [KB2040]:  
- Place the [KB2040] on the headers, flipped with the chip-side facing the PCB and the USB port protruding slightly over the PCB edge.  
- Solder the [KB2040] to the headers and then clip the ends of the headers short._

_\*Optional: Solder a Piezo Buzzer to the 'Buzzer' Pads for audio output_

_[6]. Connect top and bottom PCBs with the M2 Screws and Spacers._

This is a diode bender. I didn't realize this until after building it, so you definitely don't need to use it, but it makes things much easier.&nbsp;

![circuitpython_IMG_1851.jpg](https://cdn-learn.adafruit.com/assets/assets/000/107/684/medium640/circuitpython_IMG_1851.jpg?1641479793)

After you're done, it should look something like this. I used ALPS SKCM Orange switches, which don't have the same fixing posts as some MX-style switches do. My advice for getting them straight would be to solder them in then heat up one pin at a time and rotate or move the switch a little bit at a time until it's straight.

![circuitpython_IMG_1870.jpg](https://cdn-learn.adafruit.com/assets/assets/000/107/689/medium640/circuitpython_IMG_1870.jpg?1641481128)

![circuitpython_IMG_1871.jpg](https://cdn-learn.adafruit.com/assets/assets/000/107/690/medium640/circuitpython_IMG_1871.jpg?1641481134)

As far as keycaps go, I took the nav cluster off of my Apple Extended Keyboard II, but you can use anything you want so long as it fits on the switches.

![circuitpython_IMG_1872.jpg](https://cdn-learn.adafruit.com/assets/assets/000/107/691/medium640/circuitpython_IMG_1872.jpg?1641481221)

# Navi10 MacroPad with KB2040 and KMK CircuitPython keyboard firmware

## Installing KMK

# Navi10 MacroPad with KB2040 and KMK CircuitPython keyboard firmware

## Setting Up KMK

After having installed KMK on the previous page, you're going to want to click 'Download Project Bundle' on the file below. Unzip the file, copy&nbsp; **kb.py** to your&nbsp; **CIRCUITPY** drive and rename&nbsp; **main.py** to&nbsp; **code.py** and copy it to the&nbsp; **CIRCUITPY&nbsp;** drive as well.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Navi10/kb.py

After you've copied everything over, your **CIRCUITPY** drive should look something like this.

![](https://cdn-learn.adafruit.com/assets/assets/000/107/717/medium800/circuitpython_Navi10.png?1641835789)

## Key Mapping
There are 3 different keymaps available in the files. The default one is just the nav cluster, which is the four arrow keys and the 6 nav keys. There is also a keymap designed to give you a few keys to navigate i3 quicker (you'll probably have to edit this one since I use COLEMAK as well). The third keymap is for media control.

![circuitpython_keymap.png](https://cdn-learn.adafruit.com/assets/assets/000/125/998/medium640/circuitpython_keymap.png?1699494676)

If you want to have a specific one be the main one, move it to the top of the `keyboard.keymap` list in&nbsp; **code.py**. For example, if I wanted to have the media keys be active, I would edit&nbsp; **code.py** to look like this:

![](https://cdn-learn.adafruit.com/assets/assets/000/107/719/medium800/circuitpython_Screenshot_2022-01-10_12-46-02.png?1641836834)

At this point, the keyboard should just work when you hit the keys. Feel free to mess around with the key maps. KMK has [some good documentation on this process.](https://github.com/KMKfw/kmk_firmware/blob/master/docs/en/Getting_Started.md#tldr-quick-start-guide)

![](https://cdn-learn.adafruit.com/assets/assets/000/107/728/medium800/circuitpython_IMG_1918.jpg?1641839354)


## Guide Products

### Adafruit KB2040 - RP2040 Kee Boar Driver

[Adafruit KB2040 - RP2040 Kee Boar Driver](https://www.adafruit.com/product/5302)
A wild Kee Boar appears! It’s a shiny **KB2040**! An Arduino Pro Micro-shaped board for Keebs with RP2040. (#keeblife 4 evah) A lot of folks like using Adafruit parts for their Keeb builds – but with the ItsyBitsy not being pin-compatible with the Pro Micro pinout, it...

In Stock
[Buy Now](https://www.adafruit.com/product/5302)
[Related Guides to the Product](https://learn.adafruit.com/products/5302/guides)
### USB Type A to Type C Cable - approx 1 meter / 3 ft long

[USB Type A to Type C Cable - approx 1 meter / 3 ft long](https://www.adafruit.com/product/4474)
As technology changes and adapts, so does Adafruit. This&nbsp;&nbsp; **USB Type A to Type C** cable will help you with the transition to USB C, even if you're still totin' around a USB Type A hub, computer or laptop.

USB C is the latest industry-standard connector for...

In Stock
[Buy Now](https://www.adafruit.com/product/4474)
[Related Guides to the Product](https://learn.adafruit.com/products/4474/guides)

## Related Guides

- [Adafruit KB2040](https://learn.adafruit.com/adafruit-kb2040.md)
- [Wireless Control Button for WLED Projects](https://learn.adafruit.com/wireless-control-button-for-wled-projects.md)
- [Haiku Viewer for MagTag](https://learn.adafruit.com/haiku-viewer-for-magtag.md)
- [DOOM Keeb](https://learn.adafruit.com/doom-keeb.md)
- [Walkmp3rson: Personal MP3 'Tape' Player](https://learn.adafruit.com/walkmp3rson-personal-mp3-tape-player.md)
- [IoT Bird Feeder with Camera](https://learn.adafruit.com/iot-window-bird-feeder-with-camera.md)
- [Clue And MagTag Pep Talk Generator](https://learn.adafruit.com/clue-and-magtag-pep-talk-generator.md)
- [No-Code, No-Solder Monitoring For Perfect Bread](https://learn.adafruit.com/no-code-no-solder-temperature-monitoring-with-wippersnapper-offline.md)
- [MagTag Lists From Google Spreadsheets](https://learn.adafruit.com/collaborative-spreadsheets-to-magtag.md)
- [Adafruit IO IOT Hub with the Adafruit FunHouse](https://learn.adafruit.com/adafruit-io-hub-with-the-adafruit-funhouse.md)
- [Pixelfed Photo Viewer on Fruit Jam](https://learn.adafruit.com/pixelfed-photo-viewer-on-fruit-jam.md)
- [FunHouse Motion Detecting Lights with LIFX Bulbs](https://learn.adafruit.com/funhouse-motion-detecting-lighting-for-lifx-bulbs.md)
- [NextBus Transit Predictions for Adafruit MagTag](https://learn.adafruit.com/nextbus-transit-predictions-for-adafruit-magtag.md)
- [PyPortal Titano Weather Station](https://learn.adafruit.com/pyportal-titano-weather-station.md)
- [ESPHole Ad Blocker](https://learn.adafruit.com/esphole-ad-blocker.md)
- [USB MIDI Keyset Controller](https://learn.adafruit.com/midi-keyset.md)
