Generic PWM

trying to add a PWM output, in our case a servo, using a slider to give the servo variable speed. We can only control it backwards and forwards by adding a servo motor.

Just for my own understanding, you are trying to control the position of the servo, and the speed at which it gets to that position, correct?

Yes, in this case the servos are continuous rotation servos, and would like
to use the pot to give it variable speed. I see that each time we create a
widget it gives us code to copy to the IDE. What is the process for copying
the code when you have multiple widgets in a project.

Ah, constant rotation. Got it.
From previous experience, you’ll need to vary the equivalent of the “delay” value variable as called in the example sweep sketch with a value sent by the cayenne.

This will have the effect of increasing or decreasing the rate the servo travels at.
Just an idea.

And as far as combining the code: Check this out.
http://mydevices.com/cayenne/docs/#sketch-files-using-sketch-files-combining-sketch-files