Programming the 393 VEX Motor in Java

So we’re adding a VEX 393 motor to run a camera mount, and I was wondering how to program the actual motor. We’ve connected the motor to the speed controller it came with and from there, it connects to a PWM slot on the side car. I’ve been looking at the Java documentations under the SpeedController interface, but the only classes it implements are the Jaguar and Victor classes. I don’t know if the VEX motor uses one of those classes, or if it uses it’s own separate class. Any ideas?

I am pretty sure that almost any time you hook up any motor to a vex or jag you will use the victor class in java because when you use the victor class it wont differentiate what is wired to it. all it will do is send an output of whatever you set it to in the code.

You might want to try the servo class. I believe we got the motor to turn with the servo class. But we were also using the vex speed controller.

I believe you can either control it with the Victor or Jaguar class. I believe it is also possible to control it by creating an instance of the PWM class.

The Victor class would be correct as the VEX controller PWM timings match those of the Victor. The Jaguar uses different timings. You could certainly use the PWM class and specify the timings yourself but it would be extra work to do so.

The update rate for the victor in the control system is 100hz, which is beyond spec but works. However, I’d be hesitant to recommend it for the 393 without testing it. The servo class uses the more conservative 50hz.

Have you tried it?

I have, however I didn’t do extensive testing to verify that I was actually seeing the free speed at max signal in either direction. The Servo class would certainly seem to be the safer choice.