Introduction: MacroPad - Macro Keyboard

About: I'm a hobbyist with component ADD. Buy something that looks cool but rarely finds an application for it.

The MacroPad is a Raspberry Pi PICO based Micropython macro keyboard. I features a SD card that can hold multiple macro sets for each program you load on the card. Each TXT file can map a caption, color, and series of key strokes to one key. It also contains the macro set name and global color for the keys. You can press the dedicated button to select the macro set held on the SD card and alter the key/screen brightness.

Supplies

Step 1: Download and Print Enclosure

  1. Navigate your browser to https://www.printables.com/model/178414-macropad
  2. Download the AMF file
  3. Slice it with your favorite slicing program. (I used PrusaSlicer).
  4. All of the parts were designed to be face down but the AMF file imports them as blown out assembly, so make sure that the parts are face down on the build plate.
  5. On the bottom plate, add supports to the screw holes.
  6. Print.

Note: If you want them to appear as they do in the main picture you can play around with the filament switching at different layer heights to add some color to your print.

Step 2: Wire UP

I used DuPont connectors but I know some people would prefer to solder direct. You should think really long about when to attach your components and when to solder your wires. I soldered all the headers on then connect them up after attaching them to the enclosure.

See wiring diagrams to hookup the OLED Display, SD Card reader, NeoKey board, and the Momentary Button.

All connections will be one to one to the RP Pico EXECPT the 3.3v connection. It is shared by the SD Card Reader and OLED Display. The NeoKey board is the only thing that uses the 5V connection on the RP Pico.

I also included a picture of my creative use of DuPont connectors and angled headers on the RP Pico. Notice that I used a male connector for power amongst female connectors so that I could jump or combine them.

Step 3: Load Custom Bootloader

The current build of Micropython doesn't support the usb-hid keyboard functions needed so we will need to use one developed by the community.

  1. Download the needed firmware file here: https://forums.raspberrypi.com/download/file.php?id=50270&sid=775770a709d548de86decbe0c430bff9
  2. While holding down the BOOT SEL button on the RP Pico a plug it into your computer.
  3. You will see a new storage device as RPI-RP2.
  4. Drop the firmware.uf2 file in the new drive.
  5. The drive will disappear while the RP Pico reboots.

Step 4: Programming the RP Pico

  1. Download and install Thonny.
  2. Open Thonny.
  3. Setup the interpreter by selecting the Run dropdown and clicking Select interpreter.
  4. Now copy over the files from your desktop to the Pico using Thonny making sure that the structure of the directory root contains( lib, main.py, Settings.txt). All other .py files are stored in the "lib" directory.

Step 5: Create Macro Sets on Your SD Card

  1. Add Template.txt to the root of your SD Card.
  2. Make multiple copies of the template on your SD Card.
  3. Macro sets are loaded alphabetically so it is recommended that you number the name your files. (See examples)
  4. Template is ignored during loading.
  5. Key Considerations:
  6. "+" - This symbol denotes key combos (i.e. [CTRL]+B) If you need the plus sign then use [PLUS]
  7. Special Keys:
  8. ENTER, ESC, BACKSPACE, TAB, SPACE, PLUS, F1-F12, PRINTSCREEN, 
  9. SCROLLLOCK, PAUSE, INSERT, HOME, PAGEUP, DELETE, END, 
  10. PAGEDOWN, RIGHTARROW, LEFTARROW, DOWNARROW, UPARROW,
  11. MUTE, VOLUMEUP, VOLUMEDOWN, CTRL, SHIFT, ALT, WINDOWS
  12. Colors: BLACK, RED, YELLOW, ORANGE, GREEN, CYAN, BLUE, PURPLE, WHITE
  13. Save your Macro sets and insert the SD Card into the Macro Pad.

Step 6: Final Thoughts

I hope you enjoy this build. I'm a tad rushed to get this out but I'll try to fill in some gaps as they develop. The code has only been tested by me so if you find something, let me know...I may live to regret that.

Electronics Contest

Participated in the
Electronics Contest