Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Speed Control without CAN Jaguars (http://www.chiefdelphi.com/forums/showthread.php?t=110730)

rjbarra 08-01-2013 07:32

Speed Control without CAN Jaguars
 
Has anybody using Java done speed control without the CAN Jaguars? If you have a sample of Java code in would be appreciated.

jtdowney 08-01-2013 07:50

Re: Speed Control without CAN Jaguars
 
The code for 1646's 2011 robot is on GitHub and it used CANJaguar. Since Jaguar, CANJaguar, Victor, and now Talon all implement the SpeedController interface you should be able to treat them the same in code (an oversimplification of course but the idea is the same).

gixxy 10-01-2013 18:23

Re: Speed Control without CAN Jaguars
 
Without CAN you simply initiate a Jaguar(or Victor, ect.) object:
Code:

Jaguar climbMotor = new Jaguar(2); //Jaguar on port 2
Then setting the speed uses the set() method:
Code:

climbMotor.set(0); //Speed goes from -1 to 1

Joe Ross 10-01-2013 18:44

Re: Speed Control without CAN Jaguars
 
One of the features added to the WPILib PIDController class this year is a feedforward term. This makes tuning speed control PID much easier.


All times are GMT -5. The time now is 10:01.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi