# MIDI Foot Pedal

## Overview

https://youtu.be/SauC93I6OcI

![3d printed foot pedal ](https://cdn-learn.adafruit.com/assets/assets/000/110/478/medium800/3d_printing_hero-2.jpg?1649246474)

## DIY MIDI Controller

3D Print and build your own MIDI foot pedal to create expression to your musical performances! Use CircuitPython and QT Py RP2040 to make a MIDI controller that you can assign to any MIDI CC!

![3d_printing_hero-3.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/476/medium640/3d_printing_hero-3.jpg?1649246480)

## MIDI Control Change

Use the MIDI library for CircuitPython to create a custom MIDI controller that can trigger and control MIDI CC's (control change). Use MIDI music software to assign your MIDI controller to any number of synths and effects to adjust parameters.

![3d_printing_hero-midi-code.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/477/medium640/3d_printing_hero-midi-code.jpg?1649246486)

## Prerequisite Guides

Take a moment to walk through the following guides.

- [MIDI for Makers](https://learn.adafruit.com/midi-for-makers/overview)
- [QT Py RP2040 Introduction](https://learn.adafruit.com/adafruit-qt-py-2040)
- [Circuit Python Essentials](https://learn.adafruit.com/circuitpython-essentials)

## Parts
### Adafruit QT Py RP2040

[Adafruit QT Py RP2040](https://www.adafruit.com/product/4900)
What a cutie pie! Or is it... a QT Py?&nbsp;This diminutive dev board comes with one of our new favorite chip, the RP2040. It's been made famous in the new [Raspberry Pi Pico](https://www.adafruit.com/pico) _and_ our [Feather...](http://www.adafruit.com/product/4884)

In Stock
[Buy Now](https://www.adafruit.com/product/4900)
[Related Guides to the Product](https://learn.adafruit.com/products/4900/guides)
![Video of hand holding a QT Py PCB in their hand. An LED glows rainbow colors.](https://cdn-shop.adafruit.com/product-videos/640x480/4900-06.jpg)

### Pink and Purple Woven USB A to USB C Cable - 2 meters long

[Pink and Purple Woven USB A to USB C Cable - 2 meters long](https://www.adafruit.com/product/5044)
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also made for USB C for our modernized breakout boards, Feathers and more.&nbsp; [If you want something just like it but for Micro B, we have a B...](https://www.adafruit.com/product/4111)

Out of Stock
[Buy Now](https://www.adafruit.com/product/5044)
[Related Guides to the Product](https://learn.adafruit.com/products/5044/guides)
![Angled shot of a pink/purple woven USB cable plugged into a laptop port and a small dev board.](https://cdn-shop.adafruit.com/640x480/5044-04.jpg)

### Black Nylon Machine Screw and Stand-off Set – M3 Thread

[Black Nylon Machine Screw and Stand-off Set – M3 Thread](https://www.adafruit.com/product/4685)
Totaling **420 pieces** , this **M3 Screw Set** &nbsp;is a must-have for your workstation.&nbsp;You'll have enough screws, nuts, and hex standoffs to fuel your maker tendencies&nbsp;for days on end! M3 size screws fit a number of&nbsp;Adafruit breakout/dev board...

In Stock
[Buy Now](https://www.adafruit.com/product/4685)
[Related Guides to the Product](https://learn.adafruit.com/products/4685/guides)
![Opened box showing many nylon screws](https://cdn-shop.adafruit.com/640x480/4685-01.jpg)

### Part: Rubber Feet
quantity: 1
Rubber Bumper Feet - Pack of 4
[Rubber Feet](https://www.adafruit.com/product/550)

### Part: 10-Wire Ribbon Cable
quantity: 1
Silicone Cover Stranded-Core - 10 Wire 1 Meter Long - 28AWG Black
[10-Wire Ribbon Cable](https://www.adafruit.com/product/3890)

### Part: M3 x 16mm Screws
quantity: 2
M3 x 16mm Screws
[M3 x 16mm Screws](https://www.mcmaster.com/92095A184/)

### Part: M3 Lock Nuts
quantity: 2
M3 x 0.5mm Nylon Insert Lock Nut
[M3 Lock Nuts](https://www.mcmaster.com/90576A102/)

# MIDI Foot Pedal

## Circuit Diagram

The diagram below provides a visual reference for wiring of the components. This diagram was created using the software package [Fritzing](http://fritzing.org/download/).

![](https://cdn-learn.adafruit.com/assets/assets/000/110/249/medium800/3d_printing_circuit-diagram.jpg?1648474999)

## Adafruit Library for Fritzing

Use Adafruit's Fritzing parts library to create circuit diagrams for your projects. Download the library or just grab individual parts. Get the library and parts from [GitHub - Adafruit Fritzing Parts](https://github.com/adafruit/Fritzing-Library/tree/master/parts).

## Wired Connections

Potentiometer to QT Py RP2040

- Pin 1 to Pin **A0** on QT Py RP2040
- Pin 2 to **GND** on QT Py RP2040
- Pin 3 to **3V** on QT Py RP2040

# MIDI Foot Pedal

## 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_qtpy_rp2040/)
 **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/101/680/medium800/adafruit_products_QTRP_buttons.jpg?1618956837)

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/101/659/original/flash_nuke.uf2?1618945856)
# MIDI Foot Pedal

## Code

![](https://cdn-learn.adafruit.com/assets/assets/000/110/479/medium800/3d_printing_code-pot-cc-values.jpg?1649091894)

Once you've finished setting up your QT Py RP2040 with CircuitPython, you can access the code and necessary libraries by downloading the Project Bundle.

To do this, click on the **&nbsp;Download Project Bundle** &nbsp;button in the window below. It will download as a zipped folder.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/MIDI_Foot_Pedal/code.py

## Upload the Code and Libraries to the QT Py RP2040
After downloading the Project Bundle, plug your QT Py RP2040 into the computer's USB port. You should see a new flash drive appear in the computer's File Explorer or Finder (depending on your operating system) called&nbsp; **CIRCUITPY**. Unzip the folder and copy the following items to the QT Py RP2040's&nbsp; **CIRCUITPY** &nbsp;drive.&nbsp;

- **lib** &nbsp;folder
- **code.py**

Your QT Py RP2040 **CIRCUITPY&nbsp;** drive should look like this after copying the&nbsp; **lib** &nbsp;folder and the&nbsp; **code.py&nbsp;** file.

![](https://cdn-learn.adafruit.com/assets/assets/000/110/488/medium800/3d_printing_circuitpy-drive.jpg?1649097785)

## Adjust Min/Max Values

In the code, values from the potentiometer are mapped to a range of MIDI CC values.

Use the serial monitor and plotter in Mu Editor to see the values from the potentiometer and set the minimum and maximum values.

Change the first and second number values in the `map_range` function to map the potentiometer to the range of control change (values 0-127).

![](https://cdn-learn.adafruit.com/assets/assets/000/110/489/medium800/3d_printing_code-minmax-values.jpg?1649097963)

# MIDI Foot Pedal

## 3D Printing

## CAD Parts List

STL files for 3D printing are oriented to print "as-is" on FDM style machines. Parts are designed to 3D print without any support material. Original design source may be downloaded using the links below:

- Top-Pedal.stl
- Base-Frame.stl
- Bottom-Plate.stl
- QTPy-Holder.stl
- Pot-Holder.stl
- Pot-Linkage.stl
- Hinge-Plate.stl
- Pedal-Arm.stl
- washer-cap.stl
- washer-middle.stl
- washer-sleeve.stl

![3d_printing_3d-parts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/481/medium640/3d_printing_3d-parts.jpg?1649096072)

[Download STLs.zip](https://cdn-learn.adafruit.com/assets/assets/000/110/482/original/STLs.zip?1649096505)
[Download CAD source](https://cdn-learn.adafruit.com/assets/assets/000/110/490/original/MIDI_Foot_Pedal.zip?1649098113)
## Hinge Assembly

Sleeve washers are installed to the top pedal. Middle washers are fitted over the sleeve washers. The hinge plate is installed in between the sleeve washers. Long M3 screws are inserted through the sleeve washers. Washer caps are then installed. M3 nylon insert lock nuts are then added to secure parts.

![3d_printing_cad-hinge.gif](https://cdn-learn.adafruit.com/assets/assets/000/110/487/medium640thumb/3d_printing_cad-hinge.jpg?1649097665)

## Foot Pedal Assembly

The hinge plate is secured to the base frame with M3 screws and hex nuts. The QT Py snap fits into its holder. The potentiometer is secured its holder. The holders are secured to the bottom plate. The bottom plate is secured to the base frame with M3 screws and hex nuts.

![projects_cad-explode.gif](https://cdn-learn.adafruit.com/assets/assets/000/110/602/medium640thumb/projects_cad-explode.jpg?1649344413)

## Build Volume

The parts require a 3D printer with a minimum build volume.

- 210mm (X) x 210mm (Y) x 100mm (Z)

![3d_printing_slice-build-size.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/485/medium640/3d_printing_slice-build-size.jpg?1649096676)

## Design Source Files

The project assembly was designed in Fusion 360. This can be downloaded in different formats like STEP, STL and more. Electronic components like Adafruit's board, displays, connectors and more can be downloaded from the&nbsp;[Adafruit CAD parts GitHub Repo](https://github.com/adafruit/Adafruit_CAD_Parts).

![3d_printing_4900_QTPY-RP2040.gif](https://cdn-learn.adafruit.com/assets/assets/000/110/483/medium640thumb/3d_printing_4900_QTPY-RP2040.jpg?1649096573)

# MIDI Foot Pedal

## Wiring

## Wire for Potentiometer

Use a 3-wire ribbon cable to connect the potentiometer to the QT Py RP2040. Measure and cut the cable to 9cm(3.5in) in length.&nbsp;

![3d_printing_wires-pot-qtpy.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/421/medium640/3d_printing_wires-pot-qtpy.jpg?1648908581)

## Solder Cable to QT Py RP2040

Connect the 3-wire ribbon cable to 3V, GND and A0 pins on the QT Py RP2040.

![3d_printing_qtpy-wire-solder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/422/medium640/3d_printing_qtpy-wire-solder.jpg?1648908627)

## Solder Cable to Potentiometer

Connect the wire from A0 pin on QT Py RP2040 to the middle pin on the potentiometer. The 3V and GND wires are connected to the far left and right pins on the potentiometer.

![3d_printing_pot-wire-solder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/423/medium640/3d_printing_pot-wire-solder.jpg?1648908653)

## Soldered QT Py RP2040 and Potentiometer

Double check the wires are properly soldered to the potentiometer and QT Py 2040.

![3d_printing_qtpy-pot-wired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/424/medium640/3d_printing_qtpy-pot-wired.jpg?1648908714)

# MIDI Foot Pedal

## Assembly

## Install Potentiometer to Holder

Use a pair of pliers to remove the registration nub from the body of the potentiometer. Unfasten the hex nut and washer from the threaded shaft.&nbsp;

Insert the shaft through the potentiometer holder. Reference the image for the correct placement and orientation.

![3d_printing_pot-holder-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/425/medium640/3d_printing_pot-holder-install.jpg?1648908892)

## Secure Potentiometer to Holder

Insert the washer and hex nut on to the threaded shaft.

Use a pair of pliers to tighten the hex nut onto the threaded shaft.

Double check the potentiometer is in the correct orientation.

![3d_printing_pot-holder-nut-secure.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/426/medium640/3d_printing_pot-holder-nut-secure.jpg?1648908911)

![3d_printing_pot-holder-secured.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/427/medium640/3d_printing_pot-holder-secured.jpg?1648910308)

## Install Potentiometer Linkage

Insert the linkage to the shaft of the potentiometer.

Firmly press the linkage into the shaft.

If the fitting is too tight, use a filing tool to loosen up the tolerance.

![3d_printing_pot-link-installing.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/428/medium640/3d_printing_pot-link-installing.jpg?1648909145)

![3d_printing_pot-link-press-fit.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/429/medium640/3d_printing_pot-link-press-fit.jpg?1648909227)

## Linkage Range of Motion

Rotate the linkage to test the range of motion.

The linkage should freely rotate and only stop when reaching the base of the holder.

Remove linkage from the shaft and adjust the placement if needed.

![3d_printing_pot-link-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/430/medium640/3d_printing_pot-link-installed.jpg?1648909255)

![3d_printing_pot-link-test.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/431/medium640/3d_printing_pot-link-test.jpg?1648911222)

## Install QT Py RP2040

The QTPy RP2040 is snap fitted into the QT Py Holder.

![3d_printing_qtpy-holder-preinstall.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/432/medium640/3d_printing_qtpy-holder-preinstall.jpg?1648909523)

## Install QT Py to Holder

Insert the QT Py into the holder at and angle with the back side of the PCB fitting under the clips.

Slightly flex the holder to fit the front side of the PCB under the clips.

![3d_printing_qtpy-holder-installing.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/433/medium640/3d_printing_qtpy-holder-installing.jpg?1648911899)

![3d_printing_qtpy-holder-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/434/medium640/3d_printing_qtpy-holder-installed.jpg?1648909820)

## Assembly Check Point

Take a moment to inspect the QT Py RP2040 and the potentiometer are properly installed.

![3d_printing_qtpy-pot-holders.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/435/medium640/3d_printing_qtpy-pot-holders.jpg?1648912337)

## Install Rubber Feet

Stick the 4x rubber bumper feet into the corners of the bottom plate.

![3d_printing_bottom-feet-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/436/medium640/3d_printing_bottom-feet-install.jpg?1648909879)

## Install Potentiometer Holder

Insert 2x M3 x 10mm screws through the holes in the bottom plate.

Place the potentiometer holder onto the bottom plate so the screws are fitted through the mounting holes.

![3d_printing_bottom-pot-holder-preinstall.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/437/medium640/3d_printing_bottom-pot-holder-preinstall.jpg?1648912847)

![3d_printing_bottom-pot-holder-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/438/medium640/3d_printing_bottom-pot-holder-install.jpg?1648910031)

## Secure Potentiometer Holder

Use 2x M3 hex nuts to secure the potentiometer holder to the bottom plate.

![3d_printing_bottom-pot-holder-secure.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/439/medium640/3d_printing_bottom-pot-holder-secure.jpg?1648910050)

## Install QT Py RP2040 Holder

Insert 2x M3x10mm through the holes in the bottom plate.

Place the QT Py holder onto the bottom plate so the screws are fitted through the mounting tabs.

![3d_printing_bottom-qtpy-preinstall.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/440/medium640/3d_printing_bottom-qtpy-preinstall.jpg?1648910075)

![3d_printing_bottom-qtpy-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/441/medium640/3d_printing_bottom-qtpy-install.jpg?1648912847)

## Secure QT Py Holder

Use 2x M3 hex nuts to secure the QT Py holder to the bottom plate.

![3d_printing_bottom-qtpy-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/442/medium640/3d_printing_bottom-qtpy-installed.jpg?1648910319)

## Assembled Bottom Plate

Take a moment to tighten the screws for the QT Py and potentiometer holders.

![3d_printing_bottom-holders.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/443/medium640/3d_printing_bottom-holders.jpg?1648910414)

## Install Arm to Top Pedal

The arm is secured to the top pedal using M3 screws and hex nuts.

Insert 2x M3 x 10mm flat head screws to the top pedal.

Place the arm under the top pedal so the screws are fitted through the mounting holes.

![3d_printing_top-arm-hardware.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/444/medium640/3d_printing_top-arm-hardware.jpg?1648910540)

![3d_printing_top-arm-preinstall.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/445/medium640/3d_printing_top-arm-preinstall.jpg?1648912861)

## Secure Arm to Top Pedal

Use 2x M3 nylon insert lock nuts to secure the arm to the top pedal.

Use plier to grab hold of the lock nuts to reliably fasten parts together.

![3d_printing_top-arm-secure.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/446/medium640/3d_printing_top-arm-secure.jpg?1648910724)

![3d_printing_top-arm-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/447/medium640/3d_printing_top-arm-installed.jpg?1648910887)

## Hardware for Hinge Plate

Use the following hardware to secure the hinge to the base frame.

- 4x M3 x 10mm screws
- 4x M3 hex nuts

![3d_printing_hinge-frame-hardware.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/448/medium640/3d_printing_hinge-frame-hardware.jpg?1648912886)

## Hinge Placement

Take a moment to orient the hinge with the base frame.

Use arrow to indicate the correct orientation of the hinge with the base frame.

![3d_printing_hinge-placement.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/449/medium640/3d_printing_hinge-placement.jpg?1648911027)

## Install Washer Sleeves

Insert the washer sleeves to the holes on the left and right sides of the top pedal.

With the washer sleeves installed, insert the middle washer to the sleeves.

![3d_printing_top-sleeve-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/450/medium640/3d_printing_top-sleeve-install.jpg?1648913189)

![3d_printing_top-sleeve-washer-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/451/medium640/3d_printing_top-sleeve-washer-install.jpg?1648911195)

## Installed Middle Washer

Double check the middle washers are installed to the left and right sides.

![3d_printing_top-sleeve-washers-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/452/medium640/3d_printing_top-sleeve-washers-install.jpg?1648913206)

## Install Hinge to Top Pedal

Insert the hinge base plate onto the top pedal.

Adjust the washer sleeves and middle washers to allow the hinge base plate.

![3d_printing_top-hinge-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/453/medium640/3d_printing_top-hinge-install.jpg?1648911588)

## Install Hinge Screws

Insert 2x M3 x 16mm long screws to the left and right sides of the top pedal.

![3d_printing_top-hinge-screws-inserted.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/454/medium640/3d_printing_top-hinge-screws-inserted.jpg?1648913253)

## Install Washer Caps to Hinge

Insert the remaining washer caps to the long M3 screws.

![3d_printing_top-hinge-screw-washer-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/460/medium640/3d_printing_top-hinge-screw-washer-install.jpg?1648913289)

## Secure Lock Nuts to Hinge

Insert and fasten M3 nylon insert lock nuts to the M3 screws.

Use pliers to grab onto the lock nuts to reliably secure parts.

![3d_printing_top-hinge-locknuts-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/456/medium640/3d_printing_top-hinge-locknuts-install.jpg?1648911737)

## Assembled Top Pedal

Take a moment to check all of the hardware has been tightened.

![3d_printing_top-hinge-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/457/medium640/3d_printing_top-hinge-installed.jpg?1648911781)

## Test Hinge Plate

Rotate the hinge plate and test the fitting. The rotational movement should ideally have a snug fit.

![3d_printing_top-hinge-rotate.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/459/medium640/3d_printing_top-hinge-rotate.jpg?1648911968)

## Install Hinge Plate Screws

Rotate the hinge plate and check the orientation is correct.

Insert 4x M3x10mm screws through the mounting holes.

![3d_printing_top-hinge-orientation-check.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/458/medium640/3d_printing_top-hinge-orientation-check.jpg?1648911962)

## Install Hinge to Base&nbsp;

Orient the top pedal with the base framing.

Begin to install the hinge to the base frame by fitting the screws through the mounting holes.

&nbsp;

![3d_printing_top-frame-preinstall.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/461/medium640/3d_printing_top-frame-preinstall.jpg?1648912260)

![3d_printing_top-frame-preinstall-B.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/462/medium640/3d_printing_top-frame-preinstall-B.jpg?1648912303)

## Secure hinge plate to base frame

Use M3 hex nuts to secure the hinge plate to the base frame.

![3d_printing_top-frame-hinge-secure.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/463/medium640/3d_printing_top-frame-hinge-secure.jpg?1648912310)

## Test Pedal Hinge

Move the top pedal to test the hinge. The motion should behave like a see-saw.

![3d_printing_top-frame-hinge-test.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/464/medium640/3d_printing_top-frame-hinge-test.jpg?1648912342)

## Install Linkage to Arm

Begin to install the bottom plate to the base frame and orient the parts together.

Place the linkage from the potentiometer over the peg in the arm of the top pedal.

![3d_printing_top-frame-link-arm-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/465/medium640/3d_printing_top-frame-link-arm-install.jpg?1648912345)

## Install Bottom Plate

With the linkage and arm installed, begin to line up the mounting tabs from the bottom plate with the mounting holes on the base frame.

![3d_printing_frame-bottom-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/466/medium640/3d_printing_frame-bottom-install.jpg?1648913537)

## Secure Bottom Plate

Use M3x10mm and hex nuts to secure the bottom plate to the base frame.

![3d_printing_frame-bottom-front-secure.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/467/medium640/3d_printing_frame-bottom-front-secure.jpg?1648912553)

## Secure Bottom Plate (continued)

Install and fasten remaining hardware to the mounting tabs on the back side of the foot pedal.

![3d_printing_frame-bottom-back-secure.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/468/medium640/3d_printing_frame-bottom-back-secure.jpg?1648913616)

## Final Build

Test the motion of the foot pedal by moving the top pedal up and down.

Congratulations on your build!

![3d_printing_assembly-test.gif](https://cdn-learn.adafruit.com/assets/assets/000/110/469/medium640thumb/3d_printing_assembly-test.jpg?1648912782)

# MIDI Foot Pedal

## Usage

Plug the pedal to your computer with a known good USB Power & Data Cable.

## USB MIDI Audio MIDI Setup (Mac OS)

The QT Py RP2040 will be listed in the MIDI Studio window of the Audio MIDI Setup application for Mac OS.

The USB MIDI device is automatically configured and ready to go with DAW such as Garage band, Logic Pro, and Ableton.

![3d_printing_usb-midi-macos.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/480/medium640/3d_printing_usb-midi-macos.jpg?1649095095)

## MIDI CC Mapping & Assigning

Each music software has its own interface for mapping MIDI controllers. This topic goes outside the scope of this guide. We recommend referencing your music software documentation or search for video tutorials.


## Featured Products

### Adafruit QT Py RP2040

[Adafruit QT Py RP2040](https://www.adafruit.com/product/4900)
What a cutie pie! Or is it... a QT Py?&nbsp;This diminutive dev board comes with one of our new favorite chip, the RP2040. It's been made famous in the new [Raspberry Pi Pico](https://www.adafruit.com/pico) _and_ our [Feather...](http://www.adafruit.com/product/4884)

In Stock
[Buy Now](https://www.adafruit.com/product/4900)
[Related Guides to the Product](https://learn.adafruit.com/products/4900/guides)
### Alpha Single-Gang 16mm Right-angle PC Mount - 10K Linear

[Alpha Single-Gang 16mm Right-angle PC Mount - 10K Linear](https://www.adafruit.com/product/5280)
This **Alpha 10K Linear** potentiometer is a two-in-one, good in a breadboard or with a panel. It's a fairly standard linear taper 10K ohm potentiometer. It's smooth and easy to turn, but not so loose that it will shift on its own. We like this one because the legs are 0.2"...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/5280)
[Related Guides to the Product](https://learn.adafruit.com/products/5280/guides)
### Pink and Purple Woven USB A to USB C Cable - 2 meters long

[Pink and Purple Woven USB A to USB C Cable - 2 meters long](https://www.adafruit.com/product/5044)
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also made for USB C for our modernized breakout boards, Feathers and more.&nbsp; [If you want something just like it but for Micro B, we have a B...](https://www.adafruit.com/product/4111)

Out of Stock
[Buy Now](https://www.adafruit.com/product/5044)
[Related Guides to the Product](https://learn.adafruit.com/products/5044/guides)
### Black Nylon Machine Screw and Stand-off Set – M3 Thread

[Black Nylon Machine Screw and Stand-off Set – M3 Thread](https://www.adafruit.com/product/4685)
Totaling **420 pieces** , this **M3 Screw Set** &nbsp;is a must-have for your workstation.&nbsp;You'll have enough screws, nuts, and hex standoffs to fuel your maker tendencies&nbsp;for days on end! M3 size screws fit a number of&nbsp;Adafruit breakout/dev board...

In Stock
[Buy Now](https://www.adafruit.com/product/4685)
[Related Guides to the Product](https://learn.adafruit.com/products/4685/guides)
### Little Rubber Bumper Feet - Pack of 4

[Little Rubber Bumper Feet - Pack of 4](https://www.adafruit.com/product/550)
Keep your electronics from going barefoot, give them little rubber feet! These small sticky bumpers are our favorite accessory for any electronic kit or device. They are sticky, but not impossible to remove. They're small enough to fit onto any board, and have just enough height to give...

Out of Stock
[Buy Now](https://www.adafruit.com/product/550)
[Related Guides to the Product](https://learn.adafruit.com/products/550/guides)
### Silicone Cover Stranded-Core Ribbon Cable - 10 Wire 1 Meter Long

[Silicone Cover Stranded-Core Ribbon Cable - 10 Wire 1 Meter Long](https://www.adafruit.com/product/3890)
For those who are fans of our silicone-covered wires, but are always looking to _up their wiring game_. We now have **Silicone Cover Ribbon cables!** These may look _a lot_ like <a...></a...>

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

## Related Guides

- [Adafruit QT Py RP2040](https://learn.adafruit.com/adafruit-qt-py-2040.md)
- [LEGO Set Lighting](https://learn.adafruit.com/lego-set-lighting.md)
- [LED Neon Signs with NeoPixels](https://learn.adafruit.com/led-neon-signs-with-neopixels.md)
- [Using the CircuitPython Extension for Visual Studio Code](https://learn.adafruit.com/using-the-circuitpython-extension-for-visual-studio-code.md)
- [NeoPixel Mini VU Meter](https://learn.adafruit.com/neopixel-mini-vu-meter.md)
- [Animated Edge Lit Acrylic NeoPixel Lamp](https://learn.adafruit.com/acrylic-neopixel-lamp.md)
- [AS5600 Super Smooth Rotary Encoder](https://learn.adafruit.com/as5600-smooth-rotary-encoder.md)
- [LED Noodle Lantern](https://learn.adafruit.com/led-noodle-lantern.md)
- [Walkmellotron: Cassette Player Mods](https://learn.adafruit.com/walkmellotron.md)
- [NeXT Computer Keyboard to USB HID with CircuitPython](https://learn.adafruit.com/next-computer-keyboard-to-usb-hid-with-circuitpython.md)
- [Tandy 1000 Keyboard to USB with CircuitPython](https://learn.adafruit.com/tandy-1000-keyboard-to-usb-with-circuitpython.md)
- [Kitty Toe Bean Keypad with Color TFT](https://learn.adafruit.com/kitty-toe-bean-paw-keypad-color-tct.md)
- [Light Up your Costume with Noods](https://learn.adafruit.com/light-up-your-costume-with-noods.md)
- [Knobby Sequencer](https://learn.adafruit.com/knobby-sequencer.md)
- [CircuitPython MIDI to CV Skull](https://learn.adafruit.com/circuitpython-midi-to-cv-skull.md)
