|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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.
|
|
#2
|
||||
|
||||
|
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).
|
|
#3
|
||||
|
||||
|
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 Code:
climbMotor.set(0); //Speed goes from -1 to 1 |
|
#4
|
||||||
|
||||||
|
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.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|