Hi I am trying to invert a 0-255 analogue signal but having trouble. I know this is really simple I have just completely forgot and would appreciate any help. The analogue button increase as it slides towards me but want it to increase as it slides away from me
I tried the ~ method but does not seem to work
int button
data[0] = constrain(button,0,255);