Cool, low budget hack requiring almost no additional hardware! The author states that &quot;the signal is too strong for our input and goes off-scale, making it almost impossible to reliably detect pedal press&#x2F;release events&quot;. Since the two waveforms are visually quite distinct, it is probably possible to correlate the incoming signal with reference on and off waveforms to detect a state change reliably without using hand-crafted heuristics.