The expression pedal tip and ring inputs are both normalled to ground when nothing is connected. The plan was to configure the tip as an input with a pull-up resistor, so that if no pedal is connected it will be pulled to ground, and we’ll read a 0 at the pin.
However with the pedals I tested with, this doesn’t work - the pull-up is not strong enough to counteract the low resistance (~10kOhm) of the pot inside the EP, so even when plugged in we still get a logical 0 at the tip.
However, it has just occurred to me now, it might be possible to use a hardware interrupt to detect when something is plugged in or out: there should be a floating pin which the internal pull-up can pull up for at least an instant as the plug is inserted. Not entirely sure if that helps us much since we still won’t know if the jack has been plugged in or out, or what it is that has been dis/connected. But it’s a start.
An easier way would be to monitor the parameter to see if it ever goes over 0. If it does, something is connected. However we would still need the interrupt to know if it gets disconnected.