It’s useful to have an easily accessible reset button for the synthesizer, especially once you build it into the case and can no longer get to the Feather’s on-board reset button. You can use the reset if you ever run into difficulties uploading new code to your synth, but it’s particularly useful in dealing with MIDI panic!
What’s MIDI panic? Most MIDI instruments have a button or key combination design to send an all notes off message just in case a glitch prevents some notes that are being played from getting the ‘off’ message in the course of regular play. They’ll drone on and on forever if you don’t have a way to resend the off message.
We’ll structure our code so that one of the first things that happens upon hitting the reset button is that an all notes off message is sent. MIDI panic managed!
We'll use this momentary button as our externally accessibly reset button. This switch can also serve double duty as a power indicator using its built-in LED light ring!
Wire the Reset Button
The Feather M0 Express makes it easy to add an on/off switch to any project. The En (enable) pin on the Feather will power down the board when connected to ground. With a single pole, dual throw (SPDT) micro switch wired to En and GND we can make a very neat power switch!
You will use two raw jumper wires (female/female or female/male will work) a three hole single row jumper housing, and a three pin right angle male header pin row to wire the SPDT micro switch to the board. Note, the three pin housing and jumper arrangement allows us to plug into the board with proper spacing, even though there are only two wires connected. You'll remove the middle pin from the header row.
Follow the images in the video slideshow below to solder the pins and jumpers. Note how we use a short jumper wire to run ground from the Perma-Proto board's ground rail to the upper part of the board where we'll plug in the switch.
It's very helpful to have some indication that your synth (or any project for that matter!) is turned on when you flip the power switch. Instead of using a separate LED, we can used the LED ring that's integrated into our reset switch.
Note: In the breadboard diagram, this is shown as a separate LED.
LED Ring Wiring
Following the images in the video slideshow, you'll see how to solder a male jumper pin to the Perma-Proto board to connect the LED ring's red wire to the Feather's pin 13, as well as a set connected to the jumpered ground row.
Plug in the red LED ring wire from the button to the board's pin 13 header and the black wire to ground! We'll set up the software to light this LED when the program is running, and we'll also be able to see it blink when doing restarts for uploading code.