# Knobby Sequencer

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/138/440/medium800thumb/led_strips_knob_seq_deom_piano.jpg?1752643102)

![](https://cdn-learn.adafruit.com/assets/assets/000/138/380/medium800/led_strips_knobby-6986.jpg?1752278703)

Make your own 16-step MIDI sequencer for real-time synthesizer jams! This CircuitPython-powered project uses a QT Py RP2040, four Adafruit seesaw-based Quad Rotary Encoder breakouts for note input/mutes, and a set of NeoPixel sticks for display indicators.

Double-click the first encoder knob to enter settings mode where you can:

- adjust the tempo
- pick octaves
- transpose keys
- select scale modes
- dial in velocity
- randomize notes and mute states

Plug the Knobby Sequencer into any computer software synth, or hardware synthesizers that support USB MIDI Host mode.

https://youtu.be/7ZtGJDtv5FY

## 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)

Out of 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)

**Four (4) each of:**

### Adafruit I2C Quad Rotary Encoder Breakout with NeoPixel

[Adafruit I2C Quad Rotary Encoder Breakout with NeoPixel](https://www.adafruit.com/product/5752)
Rotary encoders are soooo much fun! Twist em this way, then twist them that way. Unlike potentiometers, they go all the way around and often have little detents for tactile feedback. But, if you've ever tried to add encoders to your project you know that they're a real challenge to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/5752)
[Related Guides to the Product](https://learn.adafruit.com/products/5752/guides)
![Video of a hand twisting the four encoder knobs with a data readout on a TFT microcontroller.](https://cdn-shop.adafruit.com/product-videos/640x480/5752-06.jpg)

**Six (6) each of:**

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

Out of 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)

### Part: Rotary Encoder + Extras
quantity: 16
+ Extras
[Rotary Encoder + Extras](https://www.adafruit.com/product/377)

### Red Micro Potentiometer Knob - 4 pack

[Red Micro Potentiometer Knob - 4 pack](https://www.adafruit.com/product/5532)
Have you found yourself in a maze of twisty-turny knobs, all alike? These micro potentiometer&nbsp;(or rotary encoder) knobs offer a rainbow burst of color to your synth or control panel. They are made of a hard plastic, with a grippy star shape. The shape is sometimes referred to as...

In Stock
[Buy Now](https://www.adafruit.com/product/5532)
[Related Guides to the Product](https://learn.adafruit.com/products/5532/guides)
![Angled shot of four red micro potentiometer knobs.](https://cdn-shop.adafruit.com/640x480/5532-00.jpg)

### Orange Micro Potentiometer Knob - 4 pack

[Orange Micro Potentiometer Knob - 4 pack](https://www.adafruit.com/product/5533)
Have you found yourself in a maze of twisty-turny knobs, all alike? These micro potentiometer&nbsp;(or rotary encoder) knobs offer a rainbow burst of color to your synth or control panel. They are made of a hard plastic, with a grippy star shape. The shape is...

In Stock
[Buy Now](https://www.adafruit.com/product/5533)
[Related Guides to the Product](https://learn.adafruit.com/products/5533/guides)
![Angled shot of four orange micro knobs.](https://cdn-shop.adafruit.com/640x480/5533-00.jpg)

### Yellow Micro Potentiometer Knob - 4 pack

[Yellow Micro Potentiometer Knob - 4 pack](https://www.adafruit.com/product/5534)
Have you found yourself in a maze of twisty-turny knobs, all alike? These micro potentiometer&nbsp;(or rotary encoder) knobs offer a rainbow burst of color to your synth or control panel. They are made of a hard plastic, with a grippy star shape. The shape is...

In Stock
[Buy Now](https://www.adafruit.com/product/5534)
[Related Guides to the Product](https://learn.adafruit.com/products/5534/guides)
![Angled shot of four yellow micro knobs.](https://cdn-shop.adafruit.com/640x480/5534-00.jpg)

### Cream Micro Potentiometer Knob - 4 pack

[Cream Micro Potentiometer Knob - 4 pack](https://www.adafruit.com/product/5539)
Have you found yourself in a maze of twisty-turny knobs, all alike? These micro potentiometer&nbsp;(or rotary encoder) knobs offer a rainbow burst of color to your synth or control panel. They are made of a hard plastic, with a grippy star shape. The shape is sometimes referred to as...

In Stock
[Buy Now](https://www.adafruit.com/product/5539)
[Related Guides to the Product](https://learn.adafruit.com/products/5539/guides)
![Angled shot of four cream micro knobs.](https://cdn-shop.adafruit.com/640x480/5539-00.jpg)

### Part: STEMMA QT / Qwiic JST SH 4-Pin Cable
quantity: 3
50mm Long
[STEMMA QT / Qwiic JST SH 4-Pin Cable](https://www.adafruit.com/product/4399)

### Part: STEMMA QT / Qwiic JST SH 4-pin Cable
quantity: 1
100mm Long
[STEMMA QT / Qwiic JST SH 4-pin Cable](https://www.adafruit.com/product/4210)

### Part: Snap-on Mount for Adafruit QT Py
quantity: 1
Milky White SLA print
[Snap-on Mount for Adafruit QT Py](https://www.adafruit.com/product/6183)

### Part: Silicone Cover Stranded-Core Ribbon Cable
quantity: 1
10 Wires - 22 AWG - 1 Meter Black
[Silicone Cover Stranded-Core Ribbon Cable](https://www.adafruit.com/product/6180)

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

### Part: Black Nylon Machine Screw and Stand-off Set
quantity: 1
M2.5 Thread
[Black Nylon Machine Screw and Stand-off Set](https://www.adafruit.com/product/3299)

# Knobby Sequencer

## 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)
# Knobby Sequencer

## Code the Knobby Sequencer

## Download the Project Bundle

Your project will use a specific set of CircuitPython libraries, and the&nbsp; **code.py** &nbsp;file. To get everything you need, click on the&nbsp; **Download Project Bundle** &nbsp;link below, and uncompress the .zip file.

Connect your computer to the board via a known good USB power+data cable. A new flash drive should show up as&nbsp; **CIRCUITPY**.

Drag the contents of the uncompressed bundle directory onto your board **CIRCUITPY** drive, replacing any existing files or directories with the same names, and adding any new ones that are necessary.

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

## How it Works

The code turns the QT Py into a MIDI step sequencer using multiple NeoRotary four encoder boards for input and NeoPixel sticks for feedback.

## Library Imports and Setup

First we import libraries:

&nbsp;

```
import time
import random
import busio
import board
import digitalio
import usb_midi
```

These handle timing, randomization, I2C communication, GPIO pins, and MIDI output respectively. The specialized libraries for the NeoRotary boards include `adafruit_seesaw` for I2C communication and `neopixel` for the LED strip control.

## Scales

The scales/modes are stored in the separate **scales.py** file.&nbsp;

At the top of **code.py** , you'll see this import:

`from scales import, list_scales, get_scale_info`

This imports three functions from the separate **scales.py** file:

- `get_scale()` - Returns the actual MIDI note numbers for a scale
- `list_scales()` - Returns a list of all available scale names
- `get_scale_info()` - Returns scales organized by categories

### Base Scale Patterns

Instead of storing complete MIDI note ranges, it stores _single-octave patterns_ relative to C (note 0):

&nbsp;

```
BASE_SCALES = {
    "major": [0, 2, 4, 5, 7, 9, 11], # C, D, E, F, G, A, B (Ionian)
    "minor": [0, 2, 3, 5, 7, 8, 10], # C, D, Eb, F, G, Ab, Bb (Aeolian)
    "pentatonic_major": [0, 2, 4, 7, 9], # C, D, E, G, A
    "blues": [0, 3, 5, 6, 7, 10], # C, Eb, F, Gb, G, Bb
    # ... many more
}
```

This is keeps the data compact while allowing expansion across any MIDI range.

### Scale Generation Function

The `generate_scale()` function takes these base patterns and expands them across the full MIDI range:

&nbsp;

```
def generate_scale(scale_name, start_note=24, end_note=95):
    """Generate a full-range scale from a base pattern"""
    if scale_name not in BASE_SCALES:
        return None

    pattern = BASE_SCALES[scale_name]
    notes = []

    # Start from the octave that contains or is below start_note
    start_octave = (start_note // 12) * 12

    # Generate notes across all octaves in range
    octave = start_octave
    while octave <= end_note:
        for interval in pattern:
            note = octave + interval
            if start_note <= end_note:
                notes.append(note)
        octave += 12

    return notes
```
## How the Main Code Uses This System

When **code.py** calls `SCALE = get_scale(SCALE_MODE)`, here's what happens:

1. **Pattern Lookup** : `get_scale()` calls `generate_scale()` with the default range (C1 to B6, MIDI notes 24-95)
2. **Octave Expansion** : The function takes the base pattern and repeats it across multiple octaves within that range
3. **Range Filtering** : Only notes within the specified MIDI range are included

For example, if you select "major" scale:

- Base pattern: `[0, 2, 4, 5, 7, 9, 11]` (C, D, E, F, G, A, B)
- Generated scale: `[24, 26, 28, 29, 31, 33, 35, 36, 38, 40, 41, 43, 45, 47, 48, ...]`
- This gives you major scale notes from C1 up to B6

## Configuration Section

The user configuration at the top makes this sequencer highly customizable:

- `SCALE_MODE`: Sets the musical scale (defaults to "major")
- `STEPS`: Configures sequence length (4, 8, 12, or 16 steps)
- `BPM`: Sets the tempo (beats per minute)
- `I2C_ADDRESSES`: Lists the addresses for up to 4 NeoRotary boards

The code calculates how many NeoPixels are needed based on the step count and validates that you have enough I2C boards connected for your chosen configuration.

## Hardware Initialization

The sequencer initializes each NeoRotary board over I2C, setting up the rotary encoders and button switches. Each board provides 4 encoders with buttons, giving you up to 16 total controls.

The external NeoPixel strip provides visual feedback with a startup animation that sweeps across all LEDs to confirm everything is working.

## MIDI Setup and Panic Function

The sequencer uses raw MIDI over USB for maximum compatibility. The `midi_panic()` function is particularly important - it sends "All Notes Off" messages on all 16 MIDI channels during startup to prevent stuck notes from previous sessions.

## Step Data Structure

Each step in the sequence is represented by a `Step` class with two properties:

- `note`: The MIDI note number to play
- `active`: Whether this step is on or off (unmuted/muted)

The `initialize_steps_from_scale()` function creates the initial sequence using notes from the selected musical scale, with the first 8 steps ascending through the scale and steps 9-16 repeating that pattern.

## Visual Feedback System

The NeoPixel strip provides rich visual feedback:

- **Step indicators** : Each step gets a color based on its pitch (yellow for low notes, green for high notes)
- **Current position** : The currently playing step shows red
- **Muted steps** : Inactive steps appear black
- **Settings mode** : Different colors indicate various parameter controls

## Settings Mode

Double-clicking the first encoder button transforms all 16 knobs into parameter controls:

**Basic Controls (Knobs 1-4):**

- Play/Stop toggle
- BPM adjustment (60-200 BPM)
- Octave transpose (-2 to +2 octaves)
- Semitone transpose (0-12 semitones)

**Scale Categories (Knobs 5-13):** The sequencer includes scales from around the world, organized by groups:

- Western (major, minor, pentatonic, etc.)
- Middle Eastern (maqam scales)
- Indonesian (gamelan scales)
- Japanese (traditional scales)
- Indian (ragas)
- Chinese (traditional scales)
- African (ethnic scales)
- Eastern European (modes)
- Celtic (traditional scales)

**Advanced Controls (Knobs 14-16):**

- Velocity baseline (20-127)
- Velocity randomization (±0-50)
- Randomize all notes and mute states

## Timing and Performance Optimization

The main loop uses timing compensation to maintain steady tempo even with I2C latency. The `expected_step_time` variable tracks when each step should occur, and the code adjusts for any drift to keep perfect timing.

To optimize performance, I2C reads only happen after every 4th step (when a board's encoders have all been processed), and the display updates are batched to reduce processing overhead.

## Real-Time Interaction

While the sequence plays, you can:

- Turn any encoder to change that step's pitch within the current scale
- Press any encoder button to toggle that step on/off
- Double-click the first encoder to enter settings mode
- In settings mode, use any encoder to adjust global parameters

The code includes double-click detection with timeout handling, ensuring reliable mode switching.

# Knobby Sequencer

## Build the Circuit

![](https://cdn-learn.adafruit.com/assets/assets/000/138/439/medium800/led_strips_knobby_frtiz2.jpg?1752624582)

![](https://cdn-learn.adafruit.com/assets/assets/000/138/334/medium800/led_strips_knobby_fritz1.jpg?1752192149)

## Address Jumpers

To use the four boards on a single I2C line, they'll be set up with unique addresses. The default I2C address is&nbsp; **0x49**. The other address options can be calculated by "adding" the&nbsp; **A0/A1/A2** &nbsp;to the base of&nbsp; **0x49**.

Flip three of the boards over and cut the following address jumpers with a hobby knife:

Board 2: Cut&nbsp; **A0** &nbsp; **= 0x4A**

Board 3: Cut&nbsp; **A1**** &nbsp;= 0x4B**

Board 4: Cut&nbsp; **A0 and A1** &nbsp; **= 0x4C**

![](https://cdn-learn.adafruit.com/assets/assets/000/138/438/medium640/led_strips_adafruit_products_dbl.jpg?1752624297)

## Connect the Encoder Boards

Use the three short STEMMA QT cables to connect the quad rotary encoder seesaw boards in address order from left to right, 49, 4A, 4B, 4C.

![](https://cdn-learn.adafruit.com/assets/assets/000/138/336/medium640/led_strips_knobby-6958.jpg?1752192237)

![](https://cdn-learn.adafruit.com/assets/assets/000/138/337/medium640/led_strips_knobby-6960.jpg?1752192253)

## Combine NeoPixel Stick PCBs

Carefully align the six NeoPixel Sticks as shown (putting them in a vice helps a lot) and tin the solder pads. Be sure to orient the boards so DOUT from one PCB connects to DIN on the next.

Use short solid core wire, resistor legs, or header pins to bridge and mechanically connect the boards as shown:

- **GND** to **GND**
- **5VDC** to **5VDC**
- **DOUT** to **DIN**

&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/138/338/medium640/led_strips_knobby-6912.jpg?1752192520)

![](https://cdn-learn.adafruit.com/assets/assets/000/138/339/medium640/led_strips_knobby-6913.jpg?1752192530)

![](https://cdn-learn.adafruit.com/assets/assets/000/138/340/medium640/led_strips_knobby-6962.jpg?1752192557)

## Solder NeoPixel to QT Py

Using three 4" lengths of silicone insulated stranded hook-up wire, solder the first (left-most) NeoPixel stick to the QT PY:

- **NeoPixel GND** to **QT Py GND**
- **NeoPixel 5V** to **QT Py 3V**
- **NeoPixel DIN** to **QT Py MO**

![](https://cdn-learn.adafruit.com/assets/assets/000/138/343/medium640/led_strips_knobby-6963.jpg?1752193226)

![](https://cdn-learn.adafruit.com/assets/assets/000/138/341/medium800/led_strips_knobby-6961.jpg?1752192571)

## Connect QT Py to Quad Rotary Encoder Boards

Use a 100mm STEMMA QT/qwiic cable to connect the QT Py to the encoder boards.

![](https://cdn-learn.adafruit.com/assets/assets/000/138/344/medium640/led_strips_knobby-6964.jpg?1752193273)

The circuit is ready for testing and then assembly into the enclosure.

# Knobby Sequencer

## Assemble the Sequencer

![](https://cdn-learn.adafruit.com/assets/assets/000/138/348/medium800/led_strips_knobby-6968.jpg?1752273932)

## Enclosure

Use the files below to either laser cut/CNC/print-on-paper-to-cut-and-drill-with-hand-tools or 3D print the enclosure and LED defuser.

The .svg file can be used for cutters, the .stl for 3D printing, or use the .3mf file for a preset slicer layout in Bambu Studio or similar.

[Knobby Seq .svg file (for laser/CNC)](https://cdn-learn.adafruit.com/assets/assets/000/138/425/original/knobby_v1.1.svg?1752593098)
[Knobby Seq .stl files](https://cdn-learn.adafruit.com/assets/assets/000/138/428/original/knobby_stls.zip?1752595105)
[Knobby Seq .3mf file for slicer](https://cdn-learn.adafruit.com/assets/assets/000/138/427/original/knobby_top_v1.0.3mf.zip?1752595059)
![](https://cdn-learn.adafruit.com/assets/assets/000/138/437/medium800/led_strips_sliced.jpg?1752619522)

## LED Diffuser

Fit the LED diffuser strip into the cast top as shown. Affix it using a few drops of cyanoacrylate glue (CA, super glue) from the underside.

![](https://cdn-learn.adafruit.com/assets/assets/000/138/351/medium640/led_strips_knobby-6971.jpg?1752274011)

![](https://cdn-learn.adafruit.com/assets/assets/000/138/352/medium800/led_strips_knobby-6970.jpg?1752274129)

## Fasten NeoPixel Sticks

Mount the NeoPixel sticks to the underside of the case top as shown using twelve sets of M2.5 x 10mm screws and nuts.

![](https://cdn-learn.adafruit.com/assets/assets/000/138/353/medium640/led_strips_knobby-6973.jpg?1752274146)

![](https://cdn-learn.adafruit.com/assets/assets/000/138/354/medium640/led_strips_knobby-6974.jpg?1752274301)

## QT Py Mount

Fasten the QT Py mount as shown using four M2.5 x 10mm screws and nuts, with the USB port slot flush with the back of the base.

![](https://cdn-learn.adafruit.com/assets/assets/000/138/347/medium640/led_strips_knobby-6967.jpg?1752273882)

## Snap Fit QT Py

Snap the QT Py into place as shown.

![](https://cdn-learn.adafruit.com/assets/assets/000/138/355/medium640/led_strips_knobby-6975.jpg?1752274330)

## Encoder Standoffs

Connect four M2.5 x 8mm hex standoffs to each encoder board as shown, using M2.5 x 4mm screws.

![](https://cdn-learn.adafruit.com/assets/assets/000/138/357/medium640/led_strips_knobby-6965.jpg?1752274545)

![](https://cdn-learn.adafruit.com/assets/assets/000/138/358/medium640/led_strips_knobby-6966.jpg?1752274699)

## Connect Encoder Boards to QT Py

Use a 100mm STEMMA QT / qwiic cable to connect the QT Py to the rotary encoder seesaw breakout boards.

![](https://cdn-learn.adafruit.com/assets/assets/000/138/356/medium640/led_strips_knobby-6976.jpg?1752274381)

## Top Plate

Press the top plate onto the sixteen encoder shafts (be sure to have removed any nuts and washers first).

Then, screw on the shaft nuts (no need for the washers).

![](https://cdn-learn.adafruit.com/assets/assets/000/138/359/medium640/led_strips_knobby-6977.jpg?1752274765)

![](https://cdn-learn.adafruit.com/assets/assets/000/138/360/medium640/led_strips_knobby-6978.jpg?1752274844)

![](https://cdn-learn.adafruit.com/assets/assets/000/138/367/medium800/led_strips_knobby-6979.jpg?1752274879)

## Connect the Enclosure Halves

Align the two halves and use the M2.5 x 6mm screws to fasten the base plate to the hex standoffs.

![](https://cdn-learn.adafruit.com/assets/assets/000/138/371/medium640/led_strips_knobby-6980.jpg?1752274936)

![](https://cdn-learn.adafruit.com/assets/assets/000/138/373/medium800/led_strips_knobby-6981.jpg?1752274997)

## Feet

Adhere four rubber bumper feet under the board to stop it from sliding around.

![](https://cdn-learn.adafruit.com/assets/assets/000/138/374/medium640/led_strips_knobby-6982.jpg?1752275023)

![](https://cdn-learn.adafruit.com/assets/assets/000/138/377/medium800/led_strips_knobby-6983.jpg?1752275076)

## Knob Time

Place each knob over it's shaft and tighten the set screw to keep it secured. Make sure not to place the knob too low or the push button function won't work.

Note: if you find the set screw is bottoming out beyond the threading, add a small spacer such as a short length of zip tie plastic between the set screw and the flatted side of the shaft.

![](https://cdn-learn.adafruit.com/assets/assets/000/138/378/medium640/led_strips_knobby-6984.jpg?1752275092)

![](https://cdn-learn.adafruit.com/assets/assets/000/138/379/medium800/led_strips_knobby-6985.jpg?1752275217)

# Knobby Sequencer

## Use the Knobby Step Sequencer

https://youtu.be/7ZtGJDtv5FY

Using a known good USB data/power cable, plug the QT Py RP2040 into a computer running a software synthesizer or a desktop synthesizer with USB MIDI Host capabilities, such as the&nbsp;[1010 Music Blackbox](https://1010music.com/product/blackbox) used in the video demo.

The Knobby Sequencer will light up and start playing preset scales!

Let's first just twist some knobs to change the notes. You can also press down on any knob to mute or unmute it, and the corresponding LEDs will go dark or light up to indicated state.

To enter settings mode, double-click the first knob. The settings are adjusted by rotating the knobs for the following functions:

![](https://cdn-learn.adafruit.com/assets/assets/000/138/441/medium800/led_strips_knobby-functions.jpg?1752644809)


## 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)

Out of Stock
[Buy Now](https://www.adafruit.com/product/4900)
[Related Guides to the Product](https://learn.adafruit.com/products/4900/guides)
### Adafruit I2C Quad Rotary Encoder Breakout with NeoPixel

[Adafruit I2C Quad Rotary Encoder Breakout with NeoPixel](https://www.adafruit.com/product/5752)
Rotary encoders are soooo much fun! Twist em this way, then twist them that way. Unlike potentiometers, they go all the way around and often have little detents for tactile feedback. But, if you've ever tried to add encoders to your project you know that they're a real challenge to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/5752)
[Related Guides to the Product](https://learn.adafruit.com/products/5752/guides)
### Rotary Encoder + Extras

[Rotary Encoder + Extras](https://www.adafruit.com/product/377)
This rotary encoder is the best of the best, it's a high-quality 24-pulse encoder, with detents and a nice feel. It is panel mountable for placement in a box, or you can plug it into a breadboard (just cut/bend the two mechanical side tabs.) We also include a nice soft-touch knob with an...

Out of Stock
[Buy Now](https://www.adafruit.com/product/377)
[Related Guides to the Product](https://learn.adafruit.com/products/377/guides)
### Red Micro Potentiometer Knob - 4 pack

[Red Micro Potentiometer Knob - 4 pack](https://www.adafruit.com/product/5532)
Have you found yourself in a maze of twisty-turny knobs, all alike? These micro potentiometer&nbsp;(or rotary encoder) knobs offer a rainbow burst of color to your synth or control panel. They are made of a hard plastic, with a grippy star shape. The shape is sometimes referred to as...

In Stock
[Buy Now](https://www.adafruit.com/product/5532)
[Related Guides to the Product](https://learn.adafruit.com/products/5532/guides)
### Orange Micro Potentiometer Knob - 4 pack

[Orange Micro Potentiometer Knob - 4 pack](https://www.adafruit.com/product/5533)
Have you found yourself in a maze of twisty-turny knobs, all alike? These micro potentiometer&nbsp;(or rotary encoder) knobs offer a rainbow burst of color to your synth or control panel. They are made of a hard plastic, with a grippy star shape. The shape is...

In Stock
[Buy Now](https://www.adafruit.com/product/5533)
[Related Guides to the Product](https://learn.adafruit.com/products/5533/guides)
### Yellow Micro Potentiometer Knob - 4 pack

[Yellow Micro Potentiometer Knob - 4 pack](https://www.adafruit.com/product/5534)
Have you found yourself in a maze of twisty-turny knobs, all alike? These micro potentiometer&nbsp;(or rotary encoder) knobs offer a rainbow burst of color to your synth or control panel. They are made of a hard plastic, with a grippy star shape. The shape is...

In Stock
[Buy Now](https://www.adafruit.com/product/5534)
[Related Guides to the Product](https://learn.adafruit.com/products/5534/guides)
### Cream Micro Potentiometer Knob - 4 pack

[Cream Micro Potentiometer Knob - 4 pack](https://www.adafruit.com/product/5539)
Have you found yourself in a maze of twisty-turny knobs, all alike? These micro potentiometer&nbsp;(or rotary encoder) knobs offer a rainbow burst of color to your synth or control panel. They are made of a hard plastic, with a grippy star shape. The shape is sometimes referred to as...

In Stock
[Buy Now](https://www.adafruit.com/product/5539)
[Related Guides to the Product](https://learn.adafruit.com/products/5539/guides)
### STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long

[STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long](https://www.adafruit.com/product/4399)
This 4-wire cable is&nbsp;50mm / 1.9" long and fitted with JST SH female 4-pin connectors on both ends. Compared with the chunkier JST PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

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

## Related Guides

- [Adafruit QT Py RP2040](https://learn.adafruit.com/adafruit-qt-py-2040.md)
- [Adafruit I2C Quad Rotary Encoder Breakout](https://learn.adafruit.com/adafruit-i2c-quad-rotary-encoder-breakout.md)
- [Feather Scorpio Snap Fit Case](https://learn.adafruit.com/feather-scorpio-snap-fit-case.md)
- [ESP32-S3 BLE iOS Media Controller](https://learn.adafruit.com/esp32-s3-ble-ios-media-controller.md)
- [Espresso Water Tank Meter](https://learn.adafruit.com/espresso-water-tank-meter.md)
- [ItsyBitsy ESP32 wFL case](https://learn.adafruit.com/itsybitsy-esp32-wfl-case.md)
- [Kitty Toe Bean Keypad with Color TFT](https://learn.adafruit.com/kitty-toe-bean-paw-keypad-color-tct.md)
- [Disconnected CO2 Data Logger](https://learn.adafruit.com/disconnected-co2-data-logger.md)
- [USB MIDI Host Messenger](https://learn.adafruit.com/usb-midi-host-messenger.md)
- [MIDI Breath Controller](https://learn.adafruit.com/midi-breath-controller.md)
- [Naughty or Nice Machine](https://learn.adafruit.com/naughty-or-nice-machine.md)
- [CircuitPython Powered Sip & Puff with ST LPS33HW Pressure Sensor](https://learn.adafruit.com/st-lps33-and-circuitpython-sip-and-puff.md)
- [NeoKey Emoji Keyboard](https://learn.adafruit.com/neokey-emoji-keyboard.md)
- [Pico W YBox3](https://learn.adafruit.com/pico-w-ybox3.md)
- [Getting Started with Microsoft Azure and CircuitPython](https://learn.adafruit.com/getting-started-with-microsoft-azure-and-circuitpython.md)
- [Tyrell Desktop Synthesizer](https://learn.adafruit.com/tyrell-desktop-synthesizer.md)
- [Sketch Drawing Toy with CircuitPython](https://learn.adafruit.com/sketch-drawing-toy.md)
