Arduino MEGA2560 UnoJoy library

Hello,

I'm using an arduino mega2560 with a unojoy library for a custom H-Shifter I made. I want to make an analog handbrake and i thought i could use the same arduino because it will be next to the shifter. I can't figure out how to change the unojoy code that uploads on my arduino automatically with the .bat unojoy file and i can't figure out how to wright that code using a 10k potentiometer. I'm a noobie so any help would be very nice, thanks in advance.