How can i reverse the value that read from potentiometer

Thanks for the replies. I was able to accomplish what I needed in MidiPipe by changing the MIDI CC to a note on, inverting the keyboard in Key Mapping and then changing it back to a MIDI CC.

Also, and I didn't try this 'cause I solved it in MidiPipe but there is a CC invert method in Surface Control (duh).

I have hundreds of tweaks already going on in MidiPipe so I prefer to use Arduino as more of an adapter as much as I can, otherwise the tweaks are spread between two programs.

Thanks