View Single Post
  #3   Spotlight this post!  
Unread 30-01-2012, 20:38
Djur's Avatar
Djur Djur is offline
WPILib
AKA: Sam Carlberg
no team
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Massachusetts
Posts: 182
Djur will become famous soon enough
Re: Drive an individual moter

If you use something like
Code:
import edu.wpi.first.wpilibj.Jaguar;

public class FullSpeedAhead{
    Jaguar motor;
    public FullSpeedAhead(){
        motor = new Jaguar(1);
    }
    public void go(){
        motor.set(1);
    }
}
then your code should work just fine regardless of your IDE, assuming you have your files in the right place (edu.wpi.first.wpilibj.TeamXXYY seems to be standard). Jaguar.set() is no better/worse than the methods it actually uses to set the given value to the Jaguar, but using it is simpler than other methods.
__________________
WPILib dev (RobotBuilder, SmartDashboard, GRIP)
Reply With Quote