# Voicebox FX

## Overview

https://youtu.be/t0cGmkmWZxQ

## Audio Recorder

Build a whismical audio recording device that features built-in effects. You can record an audio sample (20-second max) and play it back as a loop. During playback, you can change the pitch of the recording using a slider, and apply two effects: a reverb and a delay/echo using rotary potentiometers. This fun project demonstrates the audio capabilities of CircuitPython!

![](https://cdn-learn.adafruit.com/assets/assets/000/145/115/medium640/3d_printing_hero-holding.jpg?1785245206)

## Portable Device

The 3D printed enclosure houses an Adafruit Feather RP2350, I2S microphone, I2S amplifier, NeoPixels, and a built-in speaker. The device is portable, powered by a recharagable 2200mAh battery.

Featuring three-colors, the enclosre is made on a 3D printer with multi-color capability to create elements like text, icons, and colored segments.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/145/116/medium640/3d_printing_hero-down.jpg?1785246027)

## Parts
Featured
### Adafruit Feather RP2350 with HSTX Port and 8MB PSRAM

[Adafruit Feather RP2350 with HSTX Port and 8MB PSRAM](https://www.adafruit.com/product/6130)
RP2350&nbsp;flies high with the&nbsp;Feather&nbsp;format - now you can use any FeatherWings with this battery-powered dev board. It comes with 8MB of flash, 22pin HSTX output port, Stemma QT, debug SWD, and optional PSRAM spot. It's our first RP2350 board and we crammed a ton of goodies...

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

Featured
### Adafruit I2S 3W Class D Amplifier Breakout - MAX98357A

[Adafruit I2S 3W Class D Amplifier Breakout - MAX98357A](https://www.adafruit.com/product/3006)
Listen to this good news - we now have an all in one digital audio amp breakout board that works incredibly well with the&nbsp;[Raspberry Pi](https://www.adafruit.com/category/105)! If you're looking for an easy and low cost way to get your digital sound files...

In Stock
[Buy Now](https://www.adafruit.com/product/3006)
[Related Guides to the Product](https://learn.adafruit.com/products/3006/guides)
![Angled shot of blue, square-shaped, amplifier breakout with a pre-soldered terminal block.](https://cdn-shop.adafruit.com/640x480/3006-04.jpg)

Featured
### Adafruit I2S MEMS Microphone Breakout - ICS-43434

[Adafruit I2S MEMS Microphone Breakout - ICS-43434](https://www.adafruit.com/product/6049)
Listen to this good news - we now have a breakout board for a super tiny **ICS43434** &nbsp; **I2S** MEMS microphone. Just like 'classic' electret microphones, MEMS mics can detect sound and convert it to voltage, but they're way smaller and thinner. This...

In Stock
[Buy Now](https://www.adafruit.com/product/6049)
[Related Guides to the Product](https://learn.adafruit.com/products/6049/guides)
![Angled shot of black, rectangle-shaped microphone breakout board.](https://cdn-shop.adafruit.com/640x480/6049-00.jpg)

Featured
### Kailh CHOC Low Profile Red Linear Key Switches - 10-pack

[Kailh CHOC Low Profile Red Linear Key Switches - 10-pack](https://www.adafruit.com/product/5113)
For crafting your very own custom keyboard, these **&nbsp;Kailh Choc Low Profile Linear Red&nbsp;mechanical key switches** &nbsp;are super slim, with ultra-low profile compared to MX compatible switches!

Please note these are **NOT MX COMPATIBLE!** They cannot be...

In Stock
[Buy Now](https://www.adafruit.com/product/5113)
[Related Guides to the Product](https://learn.adafruit.com/products/5113/guides)
![Angled shot of 10 red Kailh Choc V1 key switches.](https://cdn-shop.adafruit.com/640x480/5113-00.jpg)

Featured
### NeoPixel Stick - 8 x 5050 RGB LED with Integrated Drivers

[NeoPixel Stick - 8 x 5050 RGB LED with Integrated Drivers](https://www.adafruit.com/product/1426)
Make your own little LED strip arrangement with this stick of NeoPixel LEDs. We crammed 8 of the tiny 5050 (5mm x 5mm) smart RGB LEDs onto a PCB with mounting holes and a chainable design. Use only one microcontroller pin to control as many as you can chain together! Each LED is addressable as...

In Stock
[Buy Now](https://www.adafruit.com/product/1426)
[Related Guides to the Product](https://learn.adafruit.com/products/1426/guides)
![NeoPixel Stick with 8 x 5050 RGB LED ](https://cdn-shop.adafruit.com/640x480/1426-05.jpg)

Featured
### Slide Potentiometer with Plastic Knob - 45mm Long

[Slide Potentiometer with Plastic Knob - 45mm Long](https://www.adafruit.com/product/4272)
_Slip slidin' away&nbsp;  
Slip slidin' away&nbsp;  
You know the nearer your resistance&nbsp;  
The more you're slip slidin' away_

If you're tired of the regular-old-twisty potentiometers we carry, why not _slide_ over and try this slide pot?...

In Stock
[Buy Now](https://www.adafruit.com/product/4272)
[Related Guides to the Product](https://learn.adafruit.com/products/4272/guides)
![hand slowly sliding potentiometer back and forth - 45mm Long.](https://cdn-shop.adafruit.com/product-videos/640x480/4272-00.jpg)

### Mini Panel Mount SPDT Toggle Switch

[Mini Panel Mount SPDT Toggle Switch](https://www.adafruit.com/product/3221)
This or that, one or the other, perhaps or perhaps not! So hard to make decisions these days without feeling like you're just going back and forth constantly. Deciding whether or not to use this mini toggle switch? That's the easiest decision you'll make all day!

This...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3221)
[Related Guides to the Product](https://learn.adafruit.com/products/3221/guides)
![Angled shot of blue, mini, SPDT toggle switch.](https://cdn-shop.adafruit.com/640x480/3221-01.jpg)

### Breadboard-friendly SPDT Slide Switch

[Breadboard-friendly SPDT Slide Switch](https://www.adafruit.com/product/805)
These nice switches are perfect for use with breadboard and perfboard projects. They have 0.1" spacing and snap in nicely into a solderless breadboard. They're easy to switch no matter what size fingers you have, but not so easy that they'll get flipped by accident. Work great as...

Out of Stock
[Buy Now](https://www.adafruit.com/product/805)
[Related Guides to the Product](https://learn.adafruit.com/products/805/guides)
![Small, black, SPDT slide switch.](https://cdn-shop.adafruit.com/640x480/805-03.jpg)

### Panel Mount 10K potentiometer (Breadboard Friendly)

quantity: 2
[Panel Mount 10K potentiometer (Breadboard Friendly)](https://www.adafruit.com/product/562)
This potentiometer is a two-in-one, good in a breadboard or with a panel. It's a fairly standard linear taper 10K ohm potentiometer, with a grippy shaft. 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" apart...

In Stock
[Buy Now](https://www.adafruit.com/product/562)
[Related Guides to the Product](https://learn.adafruit.com/products/562/guides)
![Angled Shot of the Panel Mount 10K potentiometer (Breadboard Friendly)](https://cdn-shop.adafruit.com/640x480/562-03.jpg)

### Mini Oval Speaker - 8 Ohm 1 Watt

[Mini Oval Speaker - 8 Ohm 1 Watt](https://www.adafruit.com/product/3923)
Hear the good news! This wee speaker&nbsp;is&nbsp;a&nbsp;great addition to any audio project where you need 8 ohm impedance and 1W or less of power. We particularly like this&nbsp;speaker&nbsp;as it is&nbsp;small and comes with nice skinny wires with a connector on the end. It has a handy...

In Stock
[Buy Now](https://www.adafruit.com/product/3923)
[Related Guides to the Product](https://learn.adafruit.com/products/3923/guides)
![Small, black, oval speaker with Pico Blade connector.](https://cdn-shop.adafruit.com/640x480/3923-06.jpg)

### Lithium Ion Cylindrical Battery - 3.7v 2200mAh

[Lithium Ion Cylindrical Battery - 3.7v 2200mAh](https://www.adafruit.com/product/1781)
Need a big battery for your project? This lithium-ion battery contains a 2200mAh and a protection circuit that provides over-voltage, under-voltage, and over-current protection. Yet, it is slim and easy to fit into many project cases.  
  
This cell can provide 2 **C** of...

In Stock
[Buy Now](https://www.adafruit.com/product/1781)
[Related Guides to the Product](https://learn.adafruit.com/products/1781/guides)
![Lithium Ion Cylindrical Battery - 3.7v 2200mAh with JST PH connector](https://cdn-shop.adafruit.com/640x480/1781-04.jpg)

### Snap-action 5-Wire Block Connector (12-24 AWG) - Pack of 3

[Snap-action 5-Wire Block Connector (12-24 AWG) - Pack of 3](https://www.adafruit.com/product/874)
These are like the fancy electronics equivalent of the wire nuts electricians use to bind wires together. They are a lot easier to use as well! Each block connector has a metal block inside and five levers that snap open and close to bind stranded/solid-core wire. No screwdrivers required!...

In Stock
[Buy Now](https://www.adafruit.com/product/874)
[Related Guides to the Product](https://learn.adafruit.com/products/874/guides)
![Snap-action 4-Wire Block Connector with four wires installed](https://cdn-shop.adafruit.com/640x480/874-03.jpg)

### Silicone Cover Stranded-Core Ribbon Cable - 4 Wires 1 Meter Long

[Silicone Cover Stranded-Core Ribbon Cable - 4 Wires 1 Meter Long](https://www.adafruit.com/product/3892)
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/3892)
[Related Guides to the Product](https://learn.adafruit.com/products/3892/guides)
![Coiled bundle of black, silicone covered, stranded-core ribbon cable.](https://cdn-shop.adafruit.com/640x480/3892-01.jpg)

### Silicone Cover Stranded-Core Wire - 50ft 30AWG Red

[Silicone Cover Stranded-Core Wire - 50ft 30AWG Red](https://www.adafruit.com/product/3165)
Silicone-sheathing wire is super-flexible and soft, and its also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps out. We like this wire for being extremely supple and flexible, so it is great for wearables or projects where the wire-harness has to...

In Stock
[Buy Now](https://www.adafruit.com/product/3165)
[Related Guides to the Product](https://learn.adafruit.com/products/3165/guides)
![A spool of light red AWG wire.](https://cdn-shop.adafruit.com/640x480/3165-01.jpg)

### Silicone Cover Stranded-Core Wire - 50ft 30AWG Blue

[Silicone Cover Stranded-Core Wire - 50ft 30AWG Blue](https://www.adafruit.com/product/3166)
Silicone-sheathing wire is super-flexible and soft, and its also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps out. We like this wire for being extremely supple and flexible, so it is great for wearables or projects where the wire-harness has to...

In Stock
[Buy Now](https://www.adafruit.com/product/3166)
[Related Guides to the Product](https://learn.adafruit.com/products/3166/guides)
![A spool of light blue AWG wire.](https://cdn-shop.adafruit.com/640x480/3166-01.jpg)

### Silicone Cover Stranded-Core Wire - 50ft 30AWG Yellow

[Silicone Cover Stranded-Core Wire - 50ft 30AWG Yellow](https://www.adafruit.com/product/3167)
//www.youtube.com/embed/W85OajXuDRA
?start=10

Silicone-sheathing wire is super-flexible and soft, and its also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps...

In Stock
[Buy Now](https://www.adafruit.com/product/3167)
[Related Guides to the Product](https://learn.adafruit.com/products/3167/guides)
![A spool of yellow AWG wire.](https://cdn-shop.adafruit.com/640x480/3167-01.jpg)

### Silicone Cover Stranded-Core Wire - 50ft 30AWG Green

[Silicone Cover Stranded-Core Wire - 50ft 30AWG Green](https://www.adafruit.com/product/3168)
//www.youtube.com/embed/W85OajXuDRA
?start=10

Silicone-sheathing wire is super-flexible and soft, and its also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps...

In Stock
[Buy Now](https://www.adafruit.com/product/3168)
[Related Guides to the Product](https://learn.adafruit.com/products/3168/guides)
![A spool of sea green AWG wire.](https://cdn-shop.adafruit.com/640x480/3168-01.jpg)

### Silicone Cover Stranded-Core Wire - 50ft 30AWG White

[Silicone Cover Stranded-Core Wire - 50ft 30AWG White](https://www.adafruit.com/product/3169)
//www.youtube.com/embed/W85OajXuDRA
?start=10

Silicone-sheathing wire is super-flexible and soft, and its also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps...

In Stock
[Buy Now](https://www.adafruit.com/product/3169)
[Related Guides to the Product](https://learn.adafruit.com/products/3169/guides)
![A spool of white AWG wire.](https://cdn-shop.adafruit.com/640x480/3169-01.jpg)

## Hardware Fasteners

The following hardware fasteners are required for assembling the build.

- 6x M2.5 x 4mm
- 4x M2.5 x 6mm
- 2x M2 x 4mm
- 2x M2 x 6mm
- 6x M3 x 6mm

# Voicebox FX

## Circuit Diagram

The diagram below provides a general visual reference for wiring of the components once you get to the&nbsp; **Assembly** &nbsp;page. This diagram was created using the software package&nbsp;[Fritzing](http://fritzing.org/download/).

## Adafruit Library for Fritzing

Adafruit uses the Adafruit Fritzing parts library to create circuit diagrams for projects. You can download the library or just grab individual parts. Get the library and parts from&nbsp;[GitHub - Adafruit Fritzing Parts](https://github.com/adafruit/Fritzing-Library/tree/master/parts).

![](https://cdn-learn.adafruit.com/assets/assets/000/145/094/medium800/3d_printing_Circuit-Diagram-V4.jpg?1785163014 )

## Wired Connections

The Feather RP2350 is powered by a 3.7v 2200mAh lithium ion polymer battery. Wires connecting various components:

**Feather RP2350 to ICS 43434**  
3V to VDD&nbsp;  
GND to GND  
D9 to DOUT  
D5 to BCLK  
D6 to LRCL

**Feather RP2350 to MAX98357A**  
3V to VIN  
GND to GND  
D11 to LRC  
D10 to BCLK  
SCL to DIN

**Feather RP2350 to NeoPixel**  
Bat to 5VDC  
GND to GND  
D12 (GPIO4) to DATAIN

**Feather RP2350 to Slide Potentiometer**  
3V to Pin 1 (VCC)  
A0 to Pin 2 (Signal)  
GND to Pin 3 (GND)

**Feather RP2350 to Rotary Potentiometer A**  
GND to Pin 1  
A1 to Pin 2  
3V to Pin 3

**Feather RP2350 to Rotary Potentiometer B**  
GND to Pin 1  
A2 to Pin 2  
3V to Pin 3

**Feather RP2350 to Button A**  
A3 to Pin 1  
GND to Pin 2

**Feather RP2350 to Button B**  
D24 to Pin 1  
GND to Pin 2

**Feather RP2350 to Toggle Switch**  
D25 to Pin 1  
GND to Pin 2

**Feather RP2350 to Slide Switch**  
GND to Pin 1  
EN to Pin 2

# Voicebox FX

## CAD Files

## CAD Parts

Individual 3MF files for 3D printing are oriented and ready to print on FDM machines using PLA filament. Original design source files may be downloaded using the links below.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/112/medium640/3d_printing_3d-parts.jpg?1785240523)

[Download 3MF.zip](https://cdn-learn.adafruit.com/assets/assets/000/145/113/original/3MF.zip?1785240996)
[Download CAD Source](https://cdn-learn.adafruit.com/assets/assets/000/145/114/original/CAD.zip?1785241033)
## CAD Assembly

The Feather, I2S amplifier, I2S microphone, battery, NeoPixel stick, toggle switch, slide switch and wago block connectors are secured to the bottom half of the case.

The two rotary potentiometers, slide potentiometer, key switches and speaker are secured to the top half of the case.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/106/medium640thumb/3d_printing_cad.jpg?1785181915)

## Build Volume

The parts require a 3D printer with a minimum build volume of&nbsp;80 (X) x 130 (Y) x 16mm (Z).

![](https://cdn-learn.adafruit.com/assets/assets/000/145/109/medium640/3d_printing_slice-parts.jpg?1785239785)

## Multi-color Part

The top half of the enclosure uses an AMS multi-color capable 3D printer and features three different colors. The LED diffuser should be printed using a white or clear colored PLA filament.

The rotary knob and keycaps use two different colors. Single color (blank) version of these parts are available in the ZIP file.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/111/medium640/3d_printing_slice-multicolor.jpg?1785240272)

## 3D Models of Adafruit Parts

Electronic components like Adafruit's boards and more can be downloaded from the&nbsp;[Adafruit CAD parts GitHub Repo](https://github.com/adafruit/Adafruit_CAD_Parts/).

![](https://cdn-learn.adafruit.com/assets/assets/000/145/110/medium640/3d_printing_6000_Feather_RP2350.jpg?1785239847)

# Voicebox FX

## Install 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.

Warning: The `audioi2sin`, `audiofilewriter`, and `GranularPitchShift` modules used by this project are brand new. Running this project requires using the development release of CircuitPython **10.3.0.alpha-4** or newer until there is a 10.3.0 stable release. On the downloads page scroll down to the latest development release panel.

[Download the latest version of CircuitPython for this board via circuitpython.org](https://circuitpython.org/board/adafruit_feather_rp2350/)
 **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/132/269/medium800/adafruit_products_reset_boot.jpg?1726082893)

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 RP2350 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 **RP2350**.

&nbsp;

Drag the **adafruit-circuitpython-_boardname_-_language_-_version_.uf2** file to **RP2350.**

![install_circuitpython_on_rp2350_Screenshot_2024-09-11_111518.png](https://cdn-learn.adafruit.com/assets/assets/000/132/253/medium640/install_circuitpython_on_rp2350_Screenshot_2024-09-11_111518.png?1726067809)

![install_circuitpython_on_rp2350_Screenshot_2024-09-11_111742.png](https://cdn-learn.adafruit.com/assets/assets/000/132/254/medium640/install_circuitpython_on_rp2350_Screenshot_2024-09-11_111742.png?1726067866)

The **RP2350** drive will disappear and a new disk drive called **CIRCUITPY** will appear.

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

![install_circuitpython_on_rp2350_Screenshot_2024-09-11_111843.png](https://cdn-learn.adafruit.com/assets/assets/000/132/255/medium640/install_circuitpython_on_rp2350_Screenshot_2024-09-11_111843.png?1726067932)

## 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 RP2350. 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 for RP2350](https://cdn-learn.adafruit.com/assets/assets/000/132/526/original/rp2350_flash_nuke.uf2)
# Voicebox FX

## Code the Voicebox

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

To do this, click on the **Download Project Bundle** button in the window below. It will download to your computer as a zipped folder.

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

## Upload the Code and Libraries to the RP2350 Feather

After downloading the Project Bundle, plug your RP2350 Feather into the computer's USB port with a known good USB data+power cable. You should see a new flash drive appear in the computer's File Explorer or Finder (depending on your operating system) called **CIRCUITPY**. Unzip the folder and copy the following items to the RP2350 Feather's **CIRCUITPY** drive.

- **lib** folder
- **bootbeep.wav**
- **boot.py**
- **code.py**

Your RP2350 Feather **CIRCUITPY** drive should look like this after copying the **lib** folder, **bootbeep.wav** file, **boot.py** file and&nbsp; **code.py** file:

![CIRCUITPY drive](https://adafruit.github.io/Adafruit_Learning_System_Guides/Voice_Box_FX_Changer.png )

## boot.py

This project makes use of a **boot.py** file. This file runs before **code.py** and sets the state for `readonly` mode for the **CIRCUITPY** drive. If pin **D25** is connected to ground with the toggle switch, then **CIRCUITPY** is set to read/write mode. This allows for the recordings to be saved to the CIRCUITPY drive.&nbsp;

If you need to edit **code.py** , or any other files on the **CIRCUITPY** drive, then you'll want **D25** to **not** be connected to ground to have **CIRCUITPY** be in read only mode.

```python
import board
import digitalio
import storage

switch = digitalio.DigitalInOut(board.D25)

switch.direction = digitalio.Direction.INPUT
switch.pull = digitalio.Pull.UP

# If the switch pin is connected to ground CircuitPython can write to the drive
storage.remount("/", readonly=switch.value)
```

For more information on using **boot.py** and the `storage` module, check out [this page in the CircuitPython Essentials guide](https://learn.adafruit.com/circuitpython-essentials/circuitpython-storage).

### CircuitPython Essentials - CircuitPython Storage

[CircuitPython Essentials](https://learn.adafruit.com/circuitpython-essentials)
[CircuitPython Storage](https://learn.adafruit.com/circuitpython-essentials/circuitpython-storage)
## How the CircuitPython Code Works

The code begins by initializing the pins for the three analog inputs and two button inputs. The two buttons are passed to a `keypad` object. Then the NeoPixel stick and the colors used are defined.

```python
pitch_slide = AnalogIn(board.A0)
reverb_slide = AnalogIn(board.A1)
dist_slide = AnalogIn(board.A2)
# record button on D24, play button on A3
keys = keypad.Keys((board.D24, board.A3), value_when_pressed=False, pull=True)

pixels = neopixel.NeoPixel(board.D12, 8, brightness=0.6, auto_write=True)
RED = (255, 0, 0)
YELLOW = (255, 255, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)
PURPLE = (50, 0, 255)
OFF = (0, 0, 0)
```

### I2S Settings

There are a few recording configuration variables that are set. The&nbsp;`SAMPLE_RATE` has to match across all of the audio settings. In this case, it is `16000`. The `OUTPUT_PATH` is where the recording from the I2S microphone will be saved.&nbsp;Then, the I2S input and I2S output are instantiated. The I2S output is passed to a `Mixer` object.

```python
# recording config
SAMPLE_RATE = 16000
OUTPUT_PATH = "/recording.wav"
MAX_RECORD_SECONDS = 20
# mono 16-bit = 2 bytes/sample + room for the 44-byte WAV header
CAPTURE_ALLOC = SAMPLE_RATE * 2 * MAX_RECORD_SECONDS + 64
capture = None

# Mic
mic = audioi2sin.I2SIn(
    bit_clock=board.D5,
    word_select=board.D6,
    data=board.D9,
    sample_rate=SAMPLE_RATE,
    bit_depth=32,
    output_bit_depth=16,
    mono=True,
    left_justified=False, # using ICS43434
)

i2s   = audiobusio.I2SOut(board.D10, board.D11, board.SCL)
mixer = audiomixer.Mixer(
    voice_count=1,
    sample_rate=SAMPLE_RATE,
    channel_count=1,
    bits_per_sample=16, # matches output_bit_depth
    samples_signed=True,
)
i2s.play(mixer)
mixer.voice[0].level = 0.5
```

### Effects Chain

Four effects are used for the voice changer:&nbsp;`PitchShift`, `Freeverb` (reverb), `Echo` and `Distortion`. The three analog inputs control the `semitones` for `PitchShift`, `mix` amount for `Freeverb` and `decay` amount for `Echo`. The `Distortion` effect is used as an amplifier to give a gain boost to the I2S output.

```python
pitch_shift = audiodelays.PitchShift(
    semitones=0.0,
    mix=1.0,
    window=2048,
    overlap=256,
    buffer_size=1024,
    channel_count=1,
    sample_rate=SAMPLE_RATE,
)

reverb = audiofreeverb.Freeverb(
    roomsize=0.35,
    damp=0.25,
    buffer_size=1024,
    channel_count=1,
    sample_rate=SAMPLE_RATE,
    mix=0.0,
)

echo = audiodelays.Echo(
    max_delay_ms=1000,
    delay_ms=850,
    decay=0.0,
    buffer_size=1024,
    channel_count=1,
    sample_rate=SAMPLE_RATE,
    mix=1.0,
    freq_shift=False
)

amp = audiofilters.Distortion(
    pre_gain=15,
    drive=0.00,
    mode=audiofilters.DistortionMode.LOFI,
    soft_clip=True,
    mix=1.0,
    buffer_size=1024,
    sample_rate=SAMPLE_RATE,
    bits_per_sample=16,
    samples_signed=True,
    channel_count=1,
)
```

### Boot Up Beeps

Before the loop, there are two variables that are defined.&nbsp;`loop` will determine if the audio file is playing back and `recording` will determine if a recording is in progress. Then, the boot up sound effect is loaded and passed to the `mixer` to play once. While it plays, the NeoPixels light up purple one by one.

```python
loop = False
recording = False
file = open("/bootbeeps.wav", "rb")
wav = audiocore.WaveFile(file)
mixer.voice[0].play(wav, loop=False)
# start-up purple marquee
for i in range(8):
    pixels[i] = PURPLE
    time.sleep(0.2)
time.sleep(0.5)
mixer.voice[0].level = 1.0
pixels.fill(OFF)
```

### The Loop

`keypad` events are used to monitor the two button inputs. If `key_number 0`, the record button, is pressed, it will either start a recording or stop a recording through the I2S microphone. The recordings are saved in memory using the `audiofilewriter` module and you'll see the NeoPixels turn red. When a recording is stopped, the recording stored in memory is converted to a **.WAV** file that is written to the **CIRCUITPY** drive and the NeoPixels will turn yellow. If the voice changer is in read-only mode, then the NeoPixels will light up blue to let you know that you need to flip the switch and reboot.

```python
while True:
    event = keys.events.get()
    if event:
        key_number = event.key_number
        if event.pressed and key_number == 0: # record button
            if not recording: # press to record
                i2s.stop() # stopping i2s out mutes DAC
                pixels.fill(RED) # red means recording
                capture = io.BytesIO(CAPTURE_ALLOC) # write into memory
                writer = audiofilewriter.AudioFileWriter(capture)
                writer.play(mic)
                recording = True
            else: # press to stop
                writer.stop()
                pixels.fill(YELLOW) # yellow while writing
                print("captured", capture.tell(), "bytes")
                try:
                    capture.seek(0) # write from memory to wav on file system
                    with open(OUTPUT_PATH, "wb") as f:
                        while True:
                            chunk = capture.read(4096)
                            if not chunk:
                                break
                            f.write(chunk)
                    capture.seek(0)
                    recording = False
                    pixels.fill(OFF)
                except OSError as e:
                    pixels.fill(BLUE) # error = blue, but continues running
                    print(f"Read-only mode, can't save the file, flip the switch and reboot!: {e}")
                    time.sleep(2)
                    pixels.fill(OFF)
                    continue
```

If `key_number 1`, the playback button, is pressed, it will either start playing the **recording.wav** file on a loop or stop playback through the I2S DAC. If the **recording.wav** file is missing, then the NeoPixels will light up blue to let you know. Otherwise, the NeoPixels will be green while the file is playing. The file is passed through the effects chain (pitch shift to reverb to echo to amp) to the mixer that outputs over I2S. When playback is stopped, the NeoPixels turn off.

```python
        if event.pressed and key_number == 1: # play button
            if not loop: # press to play, looping
                i2s.play(mixer)
                try:
                    # opens wav file that was just written from memory
                    file = open("recording.wav", "rb")
                    wav = audiocore.WaveFile(file)
                    print("got file")
                    pixels.fill(GREEN) # playback is green
                except AttributeError as e:
                    pixels.fill(BLUE)
                    print(f"Missing recording.wav: {e}")
                    time.sleep(2)
                    pixels.fill(OFF)
                    continue
                loop = True
                pitch_shift.play(wav, loop=True) # effect chain, all have to loop
                reverb.play(pitch_shift, loop=True)
                echo.play(reverb, loop=True)
                amp.play(echo, loop=True) # gain boost
                mixer.voice[0].play(amp, loop=True)
            else: # press to stop
                mixer.voice[0].stop()
                loop = False
                pixels.fill(OFF)
```

### Effect Controls

Outside of the&nbsp;`keypad event` listener, the three analog values are mapped to effect parameters. The reverb `mix` amount and echo `decay` amount are mapped to the two potentiometers. The pitch shift `semitone` value is mapped to the slide potentiometer. The value is scaled to an integer so that it corresponds with 12 semitones above or below the beginning pitch of the recording. This gives a full octave up and down for the range.

```python
    # controlling % of reverb in the mix
    verb = simpleio.map_range(reverb_slide.value, 100, 65536, 0.0, 1.0)
    reverb.mix = verb
    # controlling amount of echo decay
    echo_range = simpleio.map_range(dist_slide.value, 100, 65536, 0.0, 1.0)
    echo.decay = echo_range
    # an octave has 12 semitones, -13 and +13 gives full octave up and down
    pitch = simpleio.map_range(pitch_slide.value, 100, 65536, -13.0, 13.0)
    pitch_shift.semitones = int(pitch)
```

# Voicebox FX

## Wiring

## Slide Switch Wires

Prepare a set of three wires about 4.5 inches (11.4cm) in length.

Using wire strippers, remove a bit of insulation from the tips of each wire.

Tin the exposed wire by applying a bit of solder to them.

Snip off one of the leads on the slide switch, either the far left or right but not the middle. Then trim the two remaining leads short, about half their length.

Solder two of the wires to each of the leads on the slide switch.

A&nbsp;[pair of helping hands](https://www.adafruit.com/product/291)&nbsp;can assist while soldering wires in place.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/950/medium640/3d_printing_slide-switch-wire.jpg?1784899698)

![](https://cdn-learn.adafruit.com/assets/assets/000/144/951/medium640/3d_printing_slide-switch-solder.jpg?1784899721)

## Connect Slide Switch to Feather

Solder the wire from the middle pin of the slide switch to the **EN** pin on the bottom of the Feather.

Solder the two remaining wires from the slide switch to the **GND** pin on the Feather.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/952/medium640/3d_printing_slide-switch-wired.jpg?1784899744)

![](https://cdn-learn.adafruit.com/assets/assets/000/144/953/medium640/3d_printing_slide-switch-feather-solder.jpg?1784899754)

## I2S Amplifier Wires

Prepare a set of five colored wires (green, blue, yellow, red and black) about 3in (7.6cm) in length.

Using wire strippers, remove a bit of insulation from the tips of each wire.

Tin the exposed wire by applying a bit of solder to them.

Make the following solder connections.

- Yellow wire to **LRC**
- Blue wire to **BCLK**
- Green wire to **DIN**
- Black wire to **GND**
- Red wire to **VIN**

![](https://cdn-learn.adafruit.com/assets/assets/000/144/954/medium640/3d_printing_amp-wires.jpg?1784899783)

![](https://cdn-learn.adafruit.com/assets/assets/000/144/955/medium640/3d_printing_amp-solder-wires.jpg?1784899814)

## Connect I2S Amplifier to Feather

Solder the wires from the I2S amplifier to the Feather.

- Yellow Wire to Pin **#11**
- Blue wire to Pin **#10**
- Green wire to Pin **SCL**

![](https://cdn-learn.adafruit.com/assets/assets/000/144/956/medium640/3d_printing_amp-feather-solder.jpg?1784899877)

## NeoPixel Stick Wires

Prepare a set of three colored wires (black, red and green) about 5in (12.7cm) in length.

Make the following solder connections.

- Green wire to&nbsp; **DIN**
- Red wire to&nbsp; **5VDC**
- Black wire to&nbsp; **GND**

![](https://cdn-learn.adafruit.com/assets/assets/000/144/957/medium640/3d_printing_neopixel-wires.jpg?1784899926)

![](https://cdn-learn.adafruit.com/assets/assets/000/144/958/medium640/3d_printing_neopixel-solder.jpg?1784899948)

## Connect NeoPixel to Feather

Solder the wires from the NeoPixel stick to the Feather.

- Red wire to **BAT** pin
- Green wire to Pin **#4**

![](https://cdn-learn.adafruit.com/assets/assets/000/144/959/medium640/3d_printing_neopixel-feather-solder.jpg?1784899985)

## Toggle Switch Wires

Prepare a set of two colored wires (white and black) about 5in (12.7cm) in length.

Solder the black wire to the middle pin.

Solder the white wire to either the far left or right pin.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/144/960/medium640/3d_printing_toggle-switch-wires.jpg?1784900005)

![](https://cdn-learn.adafruit.com/assets/assets/000/144/961/medium640/3d_printing_toggle-switch-solder.jpg?1784900046)

## Connect Toggle Switch to Feather

Solder the wires from the toggle switch to the Feather.

- White wire to pin **#25**

![](https://cdn-learn.adafruit.com/assets/assets/000/144/962/medium640/3d_printing_toggle-feather-solder.jpg?1784900061)

## I2S Mic Wires

Prepare a set of five colored wires (black, green, blue, yellow, and red) to about 5in (12.7cm) in length.

Solder the wires to the pins on the I2S mic.

- Yellow wire to **LRCL**
- Green wire to **DOUT**
- Blue wire to **BCLK**
- Black wire to **GND**
- Red wire to **3V**

![](https://cdn-learn.adafruit.com/assets/assets/000/144/963/medium640/3d_printing_mic-wires.jpg?1784900113)

![](https://cdn-learn.adafruit.com/assets/assets/000/144/964/medium640/3d_printing_mic-solder.jpg?1784900118)

## Connect I2S Mic to Feather

Solder the wires from the I2S mic to the Feather.

- Blue wire to Pin **#5**
- Yellow wire to Pin **#6**
- Green wire to Pin **#9**

![](https://cdn-learn.adafruit.com/assets/assets/000/144/965/medium640/3d_printing_mic-feather-solder.jpg?1784900127)

## Potentiometer Wires

Prepare a set of seven colored wires (two red, two white, three black) about 6in (15cm) in length.

Solder a red wire to the left pin on one of the potentiometers.

Solder a white wire to the middle pin on the potentiometer.

Solder a black wire to the right pin on the potentiomter.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/966/medium640/3d_printing_pots-wires.jpg?1784900159)

![](https://cdn-learn.adafruit.com/assets/assets/000/144/967/medium640/3d_printing_pot-solder.jpg?1784900198)

## Connect Potentiometers

On the second potentiometer, solder a black wire and the black wire from the first potentiometer to the matching pin on the right.

Solder the remaining white wire to the middle pin on the second potentiometer.

Solder the remaining red wire to the left pin on the second potentiometer.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/968/medium640/3d_printing_pots-wires-soldered.jpg?1784900253)

## Assemble Button to Plate

Get the two choc key switches and the 3D printed button plate ready.

Firmly press the chock key switches into the cutouts in the button plate.

Make sure the key switches are install in the correct orientation.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/969/medium640/3d_printing_button-plate.jpg?1784900308)

![](https://cdn-learn.adafruit.com/assets/assets/000/144/970/medium640/3d_printing_button-plate-install.jpg?1784900323)

![](https://cdn-learn.adafruit.com/assets/assets/000/144/971/medium640/3d_printing_button-plate-installed.jpg?1784900352)

## Button Wires

Prepare a set of four colored wires (two blue, two black) about 5in (12.7cm) in length and one of the black wires shorter about 2.5 inches (6.3cm).

![](https://cdn-learn.adafruit.com/assets/assets/000/144/973/medium640/3d_printing_buttons-wires.jpg?1784900555)

## Wire Potentiometers and Buttons

Solder the free hanging black wire from the potentiometer to the middle pin of one of the key switches along with the new shorter black wire.

Solder the shorter black wire and the longer black wire to the middle pin on the second key switch.

Solder one of the blue wires to the remaining pin on the key switch.

Solder the remaining blue wire to the last open pin on the other key switch.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/972/medium640/3d_printing_buttons-wires-solder.jpg?1784900387)

## Slide Potentiometer Wires

Prepare a set of three colored wires (red, yellow and black) about 5 inches (12.7cm) in length.

Solder the red wire to pin **#1** on the slide potentiometer.

Solder the yellow wire to pin **#2** on the slide potentiometer.

Solder the black wire to pin **#3** on the slide potentiometer.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/974/medium640/3d_printing_slidepot-wires.jpg?1784900600)

![](https://cdn-learn.adafruit.com/assets/assets/000/144/975/medium640/3d_printing_slidepot-solder.jpg?1784900638)

## Connect Slide Pot to Feather

Solder the yellow wire from the slide potentiometer to pin **&nbsp;A0** on the Feather.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/101/medium640/3d_printing_slidepot-feather-solder.jpg?1785170883)

## Connect Rotary Pots to Feather

Solder the white wire from the first potentiometer to pin **A1** on the Feather.

Solder the white wire from the second potentiometer to pin **A2** on the Feather.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/102/medium640/3d_printing_pots-feather-solder.jpg?1785170901)

## Connect Buttons to Feather

Solder the blue wire from the first key swich to pin **A3** on the Feather.

Solder the blue with from the second key switch to pin **#24** on the Feather.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/104/medium640/3d_printing_buttons-feather-solder.jpg?1785170985)

## 3V Wire

Prepare a single red wire, about 5 inches (12.7 cm) in length.

This wire will connect from Feather 3V pin to the Wago block connector.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/980/medium640/3d_printing_3v-wire.jpg?1784900847)

## Connect 3V Wire to Feather

Solder the red wire to one of the **3V** pins on the Feather.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/103/medium640/3d_printing_3v-feather-solder.jpg?1785170940)

## Speaker Wires

Cut off the connector from the mini oval speaker.

Use a pair of wire strippers to remove a bit of insulation from both wires.

Apply a bit of solder to tin the exposed wire.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/976/medium640/3d_printing_speaker.jpg?1784900664)

![](https://cdn-learn.adafruit.com/assets/assets/000/144/977/medium640/3d_printing_speaker-wires.jpg?1784900675)

## Connect Battery to Feather

Plug in the 2200mAh battery to the Feather.

Use the slide switch to turn the circuit off.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/982/medium640/3d_printing_battery-feather.jpg?1784900925)

# Voicebox FX

## Assembly

## Install NeoPixel Mount

Get the bottom half of the case and NeoPixel mount ready to secure together.

Place the NeoPixel mount over the matching mounting holes inside the bottom half of the case.

Use two **M3x6mm** long steel machine screws to secure the parts together.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/983/medium640/3d_printing_neopixel-mount.jpg?1784900997)

![](https://cdn-learn.adafruit.com/assets/assets/000/144/984/medium640/3d_printing_neopixel-mount-secure.jpg?1784901011)

![](https://cdn-learn.adafruit.com/assets/assets/000/144/985/medium640/3d_printing_neopixel-mount-installed.jpg?1784901018)

## Install Battery to Case

Firmly press the **2200mAh** battery into the clip on the bottom half of the case to install it in place.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/987/medium640/3d_printing_battery-case-install.jpg?1784901147)

## Install Slide Switch to Case

Insert the slide switch into the matching holder in the bottom half of the case.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/989/medium640/3d_printing_slide-switch-case-install.jpg?1784901329)

## Install Feather to Case

Place the Feather over the matching set of standoffs inside the bottom half of the case.

Insert and fasten two **M2.5x4mm** long steel machine screws to secure the Feather to the case.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/990/medium640/3d_printing_feather-case-install.jpg?1784901363)

![](https://cdn-learn.adafruit.com/assets/assets/000/144/991/medium640/3d_printing_feather-case-secure.jpg?1784901391)

## Install I2S Amplifier to Case

Place the I2S amplifier over the matching standoffs inside the bottom half of the case.

Insert and fasten two **M2.5x4mm** long steel machine screws to secure the I2S amplifier to the case.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/992/medium640/3d_printing_amp-case-install.jpg?1784901403)

![](https://cdn-learn.adafruit.com/assets/assets/000/144/993/medium640/3d_printing_amp-case-secure.jpg?1784901449)

## Install Toggle Switch to Case

Remove the hardware nut and washers from the toggle switch.

Insert the toggle switch through the matching hole inside the bottom half of the case.

Secure the toggle switch to the case using the hardware hex nut.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/994/medium640/3d_printing_toggle-case-install.jpg?1784901492)

![](https://cdn-learn.adafruit.com/assets/assets/000/144/995/medium640/3d_printing_toggle-case-secure.jpg?1784901533)

## Install NeoPixel to Case

Place the NeoPixel stick over the matching standoffs on the NeoPixel mount.

Insert and fasten two **M2x6mm** long steel machine screws to secure the NeoPixel to the case.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/996/medium640/3d_printing_neopixel-case.jpg?1784901556)

![](https://cdn-learn.adafruit.com/assets/assets/000/144/997/medium640/3d_printing_neopixel-case-secure.jpg?1784901564)

## Install Speaker to Case

Orient the mini over speaker to match the assembly photo.

Press the speaker into the matching recess on the top half of the case.

The speaker holder in the case should have a snug fit. Optionally, remove the oval sticker backing to adhere the speaker to the case.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/998/medium640/3d_printing_speaker-case-install.jpg?1784901614)

![](https://cdn-learn.adafruit.com/assets/assets/000/144/999/medium640/3d_printing_speaker-case-secure.jpg?1784901619)

## Connect Speaker to Amplifier

Use a flat head screwdriver to loosen the screw-block terminals on the I2S amplifier.

Insert the red wire from the speaker to the (+) positive screw-block.

Insert the black wire from the speaker to the (–) negative screw-block.

Fasten the screw-block to secure the wires from the speaker in place.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/002/medium640/3d_printing_speaker-amp-connect.jpg?1784902149)

## Install I2S Mic to Case

Orient the I2S microphone to match the assembly photo.

Place the I2S microphone over the matching standoffs on the top half of the case.

Insert and fasten two **M2.5x4mm** long machine screws to secure the I2S microphone to the top half of the case.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/003/medium640/3d_printing_mic-case-install.jpg?1784902191)

![](https://cdn-learn.adafruit.com/assets/assets/000/145/004/medium640/3d_printing_mic-case-secure.jpg?1784902267)

## Install Button Plate to Case

Place the button plate over the matching standoffs on the top half of the case.

Insert and fasten four **M2.5x6mm** long machine screws to secure the button plate to the top half of the case.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/006/medium640/3d_printing_button-case-install.jpg?1784902676)

![](https://cdn-learn.adafruit.com/assets/assets/000/145/007/medium640/3d_printing_button-case-secure.jpg?1784902720)

## Install Rotary Pots to Case

Remove the hex nuts and washers from the two rotary potentiometers.

Insert the two rotary potentiometers into the matching holes on the top half of the case.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/008/medium640/3d_printing_pots-case-install.jpg?1784902759)

## Install Slide Pot to Case

Insert the slide potentiometer into matching slot and mounting holes on the top half of the case.

Insert and fasten two **M2x8mm** steel long machine screws to secure the slide potentiometer to the case.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/009/medium640/3d_printing_slidepot-case-install.jpg?1784902816)

![](https://cdn-learn.adafruit.com/assets/assets/000/145/010/medium640/3d_printing_slidepot-case-secure.jpg?1784902856)

## Connect Shared Grounds

Lift the center block tab on the Wago connector to open the connection block.

Insert the spare **ground** wire from the slide switch into the block.

Press down on the block tab to secure the **ground** wire.

Repeat the installation process for all of the **ground** wire connections to tie them together (NeoPixel, I2S microphone, I2S amplifier, potentiometer A, potentiometer B, slide potentiometer, toggle switch, key switch).

![](https://cdn-learn.adafruit.com/assets/assets/000/145/012/medium640/3d_printing_waggo-ground-install.jpg?1784902898)

![](https://cdn-learn.adafruit.com/assets/assets/000/145/013/medium640/3d_printing_waggo-grounds-secure.jpg?1784902934)

## Install Ground Block to Case

The Wago block connector can slide into the designated holder in the bottom half of the case.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/014/medium640/3d_printing_waggo-gnd-case-install.jpg?1784902987)

## Connect Shared Voltage Wires

Lift one of the tabs on the second Wago block connector and insert the single **3V** wire from the Feather.&nbsp;

Press down on the tab to secure the **3V** wire.

Repeat the installation process for all of the red voltage wires (I2S microphone, I2S amplifier, potentiometer A, potentiometer B, slide potentiometer).

![](https://cdn-learn.adafruit.com/assets/assets/000/145/015/medium640/3d_printing_waggo-vcc-secure.jpg?1784903028)

## Install Voltage Block to Case

The second Wago block connector can slide into the remaining holder in the bottom half of the case.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/016/medium640/3d_printing_waggo-vcc-case-secure.jpg?1784903049)

## Secure Pots to Case

Insert and fasten the hex nuts onto the rotary potentiometers to secure them to the case.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/018/medium640/3d_printing_pots-case-secure.jpg?1784903122)

## Secure Case Halves

Carefully join the two halves together making sure all of the wires stay inside.

Insert and fasten four **M3x6mm** long steel machine screws to secure the halves together.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/019/medium640/3d_printing_case-halves.jpg?1784903187)

![](https://cdn-learn.adafruit.com/assets/assets/000/145/020/medium640/3d_printing_case-close.jpg?1784903193)

![](https://cdn-learn.adafruit.com/assets/assets/000/145/021/medium640/3d_printing_case-secure.jpg?1784903198)

## Install Knobs and Keycaps

Get the two rotary knobs, slider knob, and keycaps ready to install.

Insert the rotary knobs over the shafts of the potentiometers.

Insert the keycaps onto the key switches.

Insert the fader knob over the nub of the slide potentiometers.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/022/medium640/3d_printing_case-caps.jpg?1784903203)

![](https://cdn-learn.adafruit.com/assets/assets/000/145/023/medium640/3d_printing_pot-knob-install.jpg?1784903328)

![](https://cdn-learn.adafruit.com/assets/assets/000/145/024/medium640/3d_printing_button-cap-install.jpg?1784903333)

![](https://cdn-learn.adafruit.com/assets/assets/000/145/025/medium640/3d_printing_slider-knob-install.jpg?1784903338)

## Final Build

Congratulations on your build!

Use the slide switch to power the circuit on and off.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/026/medium640/3d_printing_final.jpg?1784903344)

# Voicebox FX

## Use

## Power

Use the slide switch on the right side of the case to power the device on and off.

The NeoPixels light up incrementally while a power-on tune plays to indicate the device is ready to record.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/119/medium640thumb/3d_printing_use-power.jpg?1785259657)

## Record Audio

Press the record button to start a recording. The NeoPixels turn red indicating recording is active.

Press the record button again to stop the recording.

The NeoPixel will turn yellow while the audio **.WAV** file is being written to the&nbsp; **CIRCUITPY** file system.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/120/medium640thumb/3d_printing_use-record.jpg?1785260648)

## Play Audio

Press the play button to playback the recording. The NeoPixels turn green while audio is playing.

The audio will continuously loop.

Press the play button again to stop the audio.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/121/medium640thumb/3d_printing_use-play.jpg?1785261129)

## Pitch Shift

Use the slide potentiometer to shift the pitch of the audio.

Move the fader to the left to shift the pitch down.

Move the fader to the right to shift the pitch up.

Move the fader to the center to shift to the original pitch.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/122/medium640thumb/3d_printing_use-pitch.jpg?1785261657)

## Reverb

Turn the potentiometer on the left side to apply a reverb effect to the playing audio.

Turn the potentiometer to the right to increase the amount of reverb.

Turn the potentiometer to the left to decrease the reverb amount.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/123/medium640thumb/3d_printing_use-reverb.jpg?1785262226)

## Delay/Echo

Turn the potentiometer on the right side to apply a delay/echo effect.

Turn to the right to increase the delay, turn to the left to decrease the effect.

![](https://cdn-learn.adafruit.com/assets/assets/000/145/124/medium640thumb/3d_printing_use-delay.jpg?1785262363)


## Guide Products

### Adafruit Feather RP2350 with HSTX Port and 8MB PSRAM

[Adafruit Feather RP2350 with HSTX Port and 8MB PSRAM](https://www.adafruit.com/product/6130)
RP2350&nbsp;flies high with the&nbsp;Feather&nbsp;format - now you can use any FeatherWings with this battery-powered dev board. It comes with 8MB of flash, 22pin HSTX output port, Stemma QT, debug SWD, and optional PSRAM spot. It's our first RP2350 board and we crammed a ton of goodies...

In Stock
[Buy Now](https://www.adafruit.com/product/6130)
[Related Guides to the Product](https://learn.adafruit.com/products/6130/guides)
### Adafruit I2S 3W Class D Amplifier Breakout - MAX98357A

[Adafruit I2S 3W Class D Amplifier Breakout - MAX98357A](https://www.adafruit.com/product/3006)
Listen to this good news - we now have an all in one digital audio amp breakout board that works incredibly well with the&nbsp;[Raspberry Pi](https://www.adafruit.com/category/105)! If you're looking for an easy and low cost way to get your digital sound files...

In Stock
[Buy Now](https://www.adafruit.com/product/3006)
[Related Guides to the Product](https://learn.adafruit.com/products/3006/guides)
### Adafruit I2S MEMS Microphone Breakout - ICS-43434

[Adafruit I2S MEMS Microphone Breakout - ICS-43434](https://www.adafruit.com/product/6049)
Listen to this good news - we now have a breakout board for a super tiny **ICS43434** &nbsp; **I2S** MEMS microphone. Just like 'classic' electret microphones, MEMS mics can detect sound and convert it to voltage, but they're way smaller and thinner. This...

In Stock
[Buy Now](https://www.adafruit.com/product/6049)
[Related Guides to the Product](https://learn.adafruit.com/products/6049/guides)
### Kailh CHOC Low Profile Red Linear Key Switches - 10-pack

[Kailh CHOC Low Profile Red Linear Key Switches - 10-pack](https://www.adafruit.com/product/5113)
For crafting your very own custom keyboard, these **&nbsp;Kailh Choc Low Profile Linear Red&nbsp;mechanical key switches** &nbsp;are super slim, with ultra-low profile compared to MX compatible switches!

Please note these are **NOT MX COMPATIBLE!** They cannot be...

In Stock
[Buy Now](https://www.adafruit.com/product/5113)
[Related Guides to the Product](https://learn.adafruit.com/products/5113/guides)
### NeoPixel Stick - 8 x 5050 RGB LED with Integrated Drivers

[NeoPixel Stick - 8 x 5050 RGB LED with Integrated Drivers](https://www.adafruit.com/product/1426)
Make your own little LED strip arrangement with this stick of NeoPixel LEDs. We crammed 8 of the tiny 5050 (5mm x 5mm) smart RGB LEDs onto a PCB with mounting holes and a chainable design. Use only one microcontroller pin to control as many as you can chain together! Each LED is addressable as...

In Stock
[Buy Now](https://www.adafruit.com/product/1426)
[Related Guides to the Product](https://learn.adafruit.com/products/1426/guides)
### Slide Potentiometer with Plastic Knob - 45mm Long

[Slide Potentiometer with Plastic Knob - 45mm Long](https://www.adafruit.com/product/4272)
_Slip slidin' away&nbsp;  
Slip slidin' away&nbsp;  
You know the nearer your resistance&nbsp;  
The more you're slip slidin' away_

If you're tired of the regular-old-twisty potentiometers we carry, why not _slide_ over and try this slide pot?...

In Stock
[Buy Now](https://www.adafruit.com/product/4272)
[Related Guides to the Product](https://learn.adafruit.com/products/4272/guides)
### Mini Panel Mount SPDT Toggle Switch

[Mini Panel Mount SPDT Toggle Switch](https://www.adafruit.com/product/3221)
This or that, one or the other, perhaps or perhaps not! So hard to make decisions these days without feeling like you're just going back and forth constantly. Deciding whether or not to use this mini toggle switch? That's the easiest decision you'll make all day!

This...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3221)
[Related Guides to the Product](https://learn.adafruit.com/products/3221/guides)
### Breadboard-friendly SPDT Slide Switch

[Breadboard-friendly SPDT Slide Switch](https://www.adafruit.com/product/805)
These nice switches are perfect for use with breadboard and perfboard projects. They have 0.1" spacing and snap in nicely into a solderless breadboard. They're easy to switch no matter what size fingers you have, but not so easy that they'll get flipped by accident. Work great as...

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

## Related Guides

- [Adafruit MAX98357 I2S Class-D Mono Amp](https://learn.adafruit.com/adafruit-max98357-i2s-class-d-mono-amp.md)
- [Adafruit I2S MEMS Microphone Breakout](https://learn.adafruit.com/adafruit-i2s-mems-microphone-breakout.md)
- [Adafruit Feather RP2350 with HSTX](https://learn.adafruit.com/adafruit-feather-rp2350.md)
- [CircuitPython Chiptune Player](https://learn.adafruit.com/circuitpython-chiptune-player.md)
- [Rumi Sword - KPop Demon Hunters](https://learn.adafruit.com/rumi-sword.md)
- [Pathfinder Robot Companion](https://learn.adafruit.com/pathfinder.md)
- [Adafruit Metro M7 with microSD](https://learn.adafruit.com/adafruit-metro-m7-microsd.md)
- [Camera LED Ring Light](https://learn.adafruit.com/camera-ring-led-light.md)
- [Wire Spool Carousel](https://learn.adafruit.com/wire-spool-carousel.md)
- [Fruit Jam Video Music](https://learn.adafruit.com/fruit-jam-video-music.md)
- [Infinity Mirror Collar](https://learn.adafruit.com/infinity-mirror-collar.md)
- [Square NeoPixel Display with Black LED Acrylic](https://learn.adafruit.com/sqaure-neopixel-display-with-black-led-acrylic.md)
- [Glowing Scale Armor](https://learn.adafruit.com/glowing-scale-armor.md)
- [BLE Synth with the Feather nRF52840 and Circuit Playground Bluefruit](https://learn.adafruit.com/ble-synth-with-the-feather-nrf52840-and-circuit-playground-bluefruit.md)
- [Mini Neon Sign Prop & n00ds Booster Case](https://learn.adafruit.com/nood-booster-case.md)
- [Raspberry Pi LED Matrix Sand Toy](https://learn.adafruit.com/matrix-led-sand.md)
- [MIT Green Building NeoPixel Tetris](https://learn.adafruit.com/tetris-building.md)
- [Prop-Maker Feather Talking Adabot Clock](https://learn.adafruit.com/prop-maker-feather-talking-adabot-clock.md)
