Convert expression pedal analog signal to MIDI using Arduino Leonardo.
Connection : TRS Cable
Tip : A0
Ring : 5V
Sleeve : Ground
Supports TRS sustain pedals in both pedal modes: Sustain (switch) and Continuous (half-pedal).
Switch the jack to Sustain in the config tool (Jack (A0): Sustain, serial J).
Expression output is turned off while the jack is in Sustain mode. Jack (A0): Expression (K) or Set Default (E) switches it back.
The jack mode is saved in EEPROM.
Connection : TRS Cable
Tip : A1
Ring : 5V (through a 1kΩ resistor)
Sleeve : Ground
The 1kΩ resistor protects the 5V line if a mono (TS) plug is inserted, which would short Ring to Sleeve.
- Continuous (Half) (default,
H): sends CC64 0–127 by pedal position. In the pedal's switch mode this becomes a clean 0 / 127. - On/Off (
O): sends only 0 / 127 (on above 60%, off below 40%), for synths without half-pedal support.
Use Calibrate Sustain in the config tool (release → Next, press fully → Next), or send P (released) then Q (pressed fully).
Calibrate with the pedal in Continuous mode, since its full press doesn't reach the end of the range; this calibration also works in switch mode.
The calibration is saved in EEPROM. Without a saved calibration, the position at power-up is taken as "released", so keep the pedal released while plugging in.
Changing the jack mode clears the saved calibration.
Serial V prints the raw sustain input and current settings (for diagnostics).