i'd like to build a function that would:
- check if Aux ADC is in a rest position (or within a +-1 window) and output a 1
- check if Aux ADC has changed and output goes 0 and hold the value
I came up with this, which can check if aux adc is in a rest position and outputs 1 or it's being moved and outputs 0, however i would like that, once aux adc changes from the initial status, the output goes to a steady 0.
Of course if you have a better idea how to implement all this please show me.