In this project, you'll build a MIDI controller that uses 16 rotary encoders soldered to quad rotary encoder breakouts that communicate over I2C. Usually this would mean continuously polling the I2C port to check for any changes in status, which can result in a slow response time. However, this CircuitPython code uses asyncio and the interrupt pins on the breakouts to make the response nice and speedy for sending your MIDI control change messages.

This MIDI controller is designed to send MIDI control change (CC) messages to other MIDI hardware, such as guitar pedals or hardware synthesizers. You can dial in the value that you want to send with the encoder and then press the switch on the encoder to send the CC message.

A small OLED display shows the CC value and message number queued up to send. When a message is sent, you'll see "Sent!" text appear in the bottom right-hand corner.

As you turn the rotary encoders, the NeoPixels underneath the encoder will cycle through the colors of the rainbow. The onboard NeoPixel on the Feather RP2040 will also advance through the colors. This is able to happen without blocking any of the MIDI functionality thanks to asyncio.

Prerequisite Guides


Angled shot of black rectangular microcontroller "Feather RP2040"
A new chip means a new Feather, and the Raspberry Pi RP2040 is no exception. When we saw this chip we thought "this chip is going to be awesome when we give it the Feather...
In Stock
Angled shot of a Adafruit MIDI FeatherWing Kit.
Turn your Feather into a song-bird with this musically-enabled FeatherWing that adds MIDI input and output jacks to just about any Feather. You get both input and output DIN-5 MIDI...
In Stock
Video of a hand twisting the four encoder knobs with a data readout on a TFT microcontroller.
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....
In Stock
Rotary Encoder with rubbery knob
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...
In Stock
Monochrome 0.96" OLED module with Adafruit logo
These displays are small, only about 1" diagonal, but very readable due to the high contrast of an OLED display. This display is made of 128x64 individual white OLED pixels, each...
In Stock
Double prototyping feather wing PCB with socket headers installed
This is the FeatherWing Doubler - a prototyping add-on and more for all Feather boards. This is similar to our
In Stock

This guide was first published on Jul 25, 2023. It was last updated on Jul 19, 2024.

This page (Overview) was last updated on Mar 08, 2024.

Text editor powered by tinymce.