Log in

View Full Version : Sending speed commands to CANJaguars


Poseidon5817
29-11-2014, 21:42
How do I go about sending a command to a CANJaguar instance? Is there a way that you could send a straight RPM using CANJaguar.something(500)? I've already done CANJaguar.setSpeedReferece(...kEncoder) and CANJaguar.changeControlMode(...kSpeed) Also, how do you configure the amount of pulses per encoder revolution and the distance per pulse for the encoder connected to the Jaguar?

orangelight
29-11-2014, 23:42
Look at our code from 2012 (https://code.google.com/p/frc548-robostangs/source/browse/Robot2012point6/src/com/robostangs/Shooter.java)
You should be able to do this to set the encoder pulse
CANJaguar.configEncoderCodesPerRev(360);

Poseidon5817
30-11-2014, 02:05
Thanks, that's perfect.