hold last sensor value

PaulS:
So, you want it to detect the highest value read within some period of time? Remember that the 0 values that it reads are perfectly valid values. Remember also that it will read values from zero up to some high value and then all the way back down to zero.

If I press 0 that would indeed be the right value for that case. However, I would like it to continously send the last value I pressed circumventing the automatic drop back to 0.

I am building a midi instrument and I am using the position sensor to update filter parameters. Kinda dull if it always snaps back to zero. It should just stay where I last lifted my finger.

cheers