Filter Exp Pedal oscillation using Mid Translator

Hi,

I just created a new solution for this.

The expression pedal will need to move 3 clicks before it activates. Once activated, only 1 click is required. Then if the pedal is not moved within 500ms, it reverts back to 3 clicks so it should give you the precision you need and the eliminate the oscillation after 500 ms (1/2 second)

I use 3 global variables and a watchdog timer to control.

  1. The amount of clicks required
  2. The timeout period
  3. The last known value of the pedal
// minimum amount to move to recognize the pedal
// has moved
ga=3
// timeout in ms
gb=500
// last known value
gc=0

These values are set up a project start.

Enjoy!

FCB-1010-Debounce.bmtp (2.1 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz