This comment should be a good starting point for the configuration of duty-cycle based PWM, and links to a thorough example of setting up control of an output with a slider. Feel free to follow up if you get stuck on parts of that.
If you really want increment/decrement control via the joystick,