MIDI Accordion version 1.3 introduces support for a new component: a joystick that can be used to control pitch bend! I positioned the joystick to be triggered by the accordion’s master switch palm button, thus creating a whammy bar:

Joystick Potentiometer

Here’s a demo video of the whammy bar in action:

In order to support potentiometer input, more analog pins were needed since the 16 existing analog pins on the Arduino Mega were already in use by the opto-interruptor transistors. Fortunately, I learned from mojca recently that analog pins were not required for the final project (since the code is doing a direct digital port read instead of an anlog read). This meant I could move the transistor connections off of the analog ports and onto one of the other digital ports instead, freeing up 16 pins for additional analog input! While I was already switching pins, I decided to also move the diode connections off of the PWM pins to free up those as well (not sure if I’ll use them yet, but it’s good to have more options available).

Given all of this pin switching, note that if you are upgrading your own MIDI accordion to v1.3 from an earlier version, you will need to change how your opto-interruptor pins are connected to the Arduino. See updated schematics and changelog for details.

This is the first in a series of updates I plan on making for this project to add more controls and effects to make this instrument as expressive as possible. Now that there are 15 open analog pins, more potentiometers can be added (e.g. knobs, sliders, more joysticks, etc.) without having to add multiplexers or shift registers. And the Arduino Mega still has 23 digital pins open for other components such as switches and LED indicators.