Hi-Tec Servo Help

How would i program a servo to allow me to use a joystick to move it?

Servo.cpp in the WPILib folder.
*
*

But which do i use, i want to be able to controller but servo on the camera mount with one joystick

Be more detailed about what you want to do, and you’ll get more specific advice about how to do it.

What exactly do you want the servo to do, and what exactly do you want to do with the joystick in order for the servo to do it?

we are putting our axis camera onto the Pan and Tilt Assembly for camera With the HiTec Servo. I want to controller both servos with the joystick of a PS3 controller, but i want it to be both servos with one of the joystick.

I know that the joystick is the Y

Just saying you want to “control servos with a joystick” isn’t nearly enough information. Do you want the servo position to match the position of the joystick? For example, would you like to move the joystick to the left and the servo turns to the left, then you return the joystick to the center position and the servo returns to center? Or do you want the servo to move based on the joystick, where it travels further left each time you push the joystick left, and travels further right each time you push the joystick right, and stays where it is when the joystick is in the center position? Or do you want the servo to move constantly as long as the joystick is pressed to the side? Do you want it to move slowly when the joystick is just pressed a little, and quickly when the joystick is pressed a lot?

Try again to say exactly what you want to have happen. Use as much detail as possible. Before you can write a program to do it, you have to be able to describe what you want it to do in clear, unambiguous terms.

I want it so when i push left it goes left and when i stop it stays where it is. but i also want to be able to push left and up at the same time and have the camera do it. and i want it to move at the fastest speed without losing video quality

So when the joystick X value is negative you want to constantly decrement the servo position, when the joystick X value is positive you want to constantly increment the servo position, and when the joystick X value is zero you want to leave the servo position alone.

but i also want to be able to push left and up at the same time and have the camera do it.

Fine. On a second servo: for X above substitute Y.

and i want it to move at the fastest speed without losing video quality

You’ll have to determine this rate yourself. It’ll define how often you need to check the joystick value and increment/decrement the servo position. If it makes sense, you can check less often but move the servo farther each increment.

Does that help?