Raspberry Pi Pico 4xN Midi Arcade Button Box

Mashup of 2 Adafruit projects to make a 4x4 (4xn) Arcade Button/Led MIDI Device

Public Chat
Similar projects worth following
Friend asked if we could make something like the Midi Fighter box to control an art project. We found two Adafruit Learn projects - one using the rPi Pico that directly wires to the 30mm Arcade Buttons with LED to send MIDI, and one using the Adafruit LED Arcade Button 1x4 StemmaQT breakout. The former has extra features (mini screen, joystick, etc) and lots of soldering. The latter only gets as far as blinking/fading the leds when a button is pressed. No problem, i says. A few (long) hours of coding and it works! time to hand off to the case maker.

MIDI control boxes are a popular product, although they can be expensive.  We wanted to build one with a custom box, and perhaps reconfigure.  We found two Adafruit Learn articles describing something close using the rather cool CircuitPythonsystem:

  1. Raspberry Pi Pico and LED Arcade Button MIDI Controller :  a 4x4 array of buttons with fancy little screen to change their notes buttons and leds are directly connected to the rPi Pico
  2. Adafruit LED Arcade Button 1x4 STEMMA QT  uses the Adafruit LED Arcade Button 1x4 STEMMA QT to handle buttons by i2c. This is much cleaner approach but the project doesn't do the midi or fadeIn/Out led effects

Setup of the Pico for CircuitPython is well covered in Getting Started with Raspberry Pi Pico and CircuitPython

 I use several different editors (Visual Studio Code, PyCharm, etc) but for this CircuitPython project, I found the Mu editor worked best as it has a console window to connect with the device.  I did have some issues with the Pico reboot/autoload but there is a quick hack around that in code.

Both the Learn.Adafruit projects use the Arcade Buttons which  have a plain white led. Adafruit does offers different color options for the plastic housing The Adafruit documentation doesn't provide a reference as to which are pins are for switch vs led: (yes need to add pic here)

  • switch is on staggered pins
  • led +/- is on in-line pins, +- with arrows point to that side

It is possible to take the buttons apart and insert color gels or other labels if you want. It would be really nice if there were some nice Arcade Buttons with neopixel leds, but that is still a hack left to the adventurous.  I did that for another project which i might document here someday.

The i2c board makes it MUCH easier to build a 4xN button box.

Using I2C with jumper locations, up to 16 boards can be supported, for total of 64 buttons. That is a LOT more than you could directly wire. Adafruit's Arcade Button Quick Connect Wires eliminate soldering for buttons and leds. This reduces total number of solder connections to the 4 i2c lines to the Pico, assuming you use a JST-PH 4 wire connection.  Adafruit offers a nice JST SH 4-pin to Male Headers Cable that makes it easy. You could use regular hookup wire from the Pico to the side holes on the i2c board, or cut one of the various JST SH cables.

personal vetch: there are many different JST connector types with different spacing.  Be sure to get SH cables for these boards

The Adafruit code examples are written to support multiple processor boards. Some use board.i2c others use busio.I2C. Neither example mentions the rPi Pico. The Pico uses busio. I eliminated the board.i2c to reduce confusion.

A USB microB panel mount will be used to bring the USB/power connector outside the box.

Code is available on my GitHub Project

We are fabricating a custom case to hold the buttons. That is a whole other project that perhaps will be documented in the logs here.

Future updates *might* look at adding sliders or dials for midi Continuous Control (CC) or Pitch Bend, or switch out MIDI to HID interface to make a hot key pad.  Probably also look into using larger buttons.  In a previous project I hacked some neoPixel rings into 60mm buttons and it worked ok.  I need to revisit that process.


Video of 1x4 sending Midi data to PC

3gpp - 299.38 kB - 06/28/2022 at 19:50


View all 7 components

  • V1 at FuzzFest2022

    Jerry Isdale07/11/2022 at 03:00 0 comments

    Here's the full setup as run at the July 9 2022 event - FuzzFest 2022

  • Backstage At FuzzFest2022

    Jerry Isdale07/11/2022 at 02:58 0 comments

    The MIDI box sent data to resolume on PC.  It listened for one  of 64 midi notes and switched the video output.

  • Controller Box Build

    Jerry Isdale07/11/2022 at 02:54 0 comments

    The controller build was delayed by weather and overcommitted project lead (concept, art, carpentry etc by Markus) but was completed on site for FuzzFest2022.

    Rewiring up the buttons became a community build project.

    Err um yes we meant for that hole to be there. Had to get USB out of box somehow.

    And of course a couple LEDs got wired backwards and had to be redone

  • Added Bank Switching

    Jerry Isdale07/02/2022 at 20:50 0 comments

    Latest update (and likely one to be used at event) modifed the 5x4 version.

    The "" version drops back to 16 midi buttons, with the 5th (default address) board being used as a "bank switch" - it changes the midi notes associated with the midi buttons.  4 arrays are used to hold the Banks, and pressing one of the BankSwitches,  changes which bank is active.

    This is  the arcadeQT with the colored buttons.  The leds in these are Digital IO and stay on to show  which bank is active.

  • Short presses are flaky

    Jerry Isdale07/02/2022 at 08:43 0 comments

    The 5x4 array misses most short button presses. If you hold a button down, it sees it and lights up. But if you more quickly press and release, it never sees the actions.

    Not sure why the response time is so bad/flaky.  We upped the i2c speed to 400khz so that shouldnt be a bottle neck - not that it would be.   For near term we are calling it a Feature, because the beast goes live at event in 1 week.

  • Expand to 5x4 array of midi buttons

    Jerry Isdale07/02/2022 at 06:27 0 comments

    Today we wired up a total of 5 arcade button boards with 30mm buttons, and extended the code to support it as total of 20 midi buttons.  The new code is in in the github archive.

    Here's my blond assistant checking over the connections of the full 20 button setup.

    Next up will be making one set of 4 buttons be built in bank switchers. Pressing one of these will switch to a different button-to-note mapping.

    Then we got the weekend  to build the housing and hook it up to Resolume so it selects 64 video clips.

View all 6 project logs

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates