Log in

View Full Version : How to use Axis Camera Servos in Java


graham.robots
11-02-2014, 16:59
Hello,
We are having a problem moving the camera servos with the Axis camera. They are plugged into the digital sidecar through PWM cables, and we have the jumpers installed. We have them declared through the Servo class, however, they still aren't moving with both the setAngle() and set() methods. What are we missing?
Thanks,
Team #4024

Joe Ross
11-02-2014, 17:02
If you remove the DB-37 cable from the digital sidecar, are all 3 power LEDs lit? Are you enabling the robot on the driver station before trying to move the servos?

graham.robots
11-02-2014, 17:39
Yes, all three green LEDs are on with the DB-37 pulled. And yes, we are running it with the driver station enabled.

Joe Ross
11-02-2014, 17:52
Can you post your code?

graham.robots
11-02-2014, 18:11
//Declaration
Servo cameray = new Servo(7);

//Implementation
if (aButton.get() && !yButton.get())
{
//Tried both of these
//cameray.set(1);
cameray.setAngle(180);
}
else
{
//cameray.set(0);
cameray.setAngle(90);
}