Continuous Servo Range

Hello i was wondering if i had a continuous rotation servo if i could set a range of motion for it, say 0-360 degrees as an example. I am not sure how the coding for it would work.

Thank You,
Easton

You could do it with some sort of limit switch or encoder, either mechanical or optical.

But i cannot define it within the code?

Assuming you're talking about a modded R/C servo, and not a true continuous rotation servo, no, there's nothing you can do purely in code.
The device has no feedback mechanism, so has no idea "where" it is.

That's why you need a limit switch or encoder.