Log in

View Full Version : Circle Tracker Demo


nomad725
15-02-2010, 11:31
I am trying to port the demo code into our code when I found out the Tracker demo uses the robot drive class. Anyone have/know how to change this into two independent Jaguar motors?

BradAMiller
16-02-2010, 16:10
I am trying to port the demo code into our code when I found out the Tracker demo uses the robot drive class. Anyone have/know how to change this into two independent Jaguar motors?

The RobotDrive class will work with either 2 or 4 Jaguar controlled motors. You just need to call the constructor with the port numbers that each of the Jaguars is connected to. You can find the call to the constructor in the 4th line in the CircleTrackerDemo class definition:
RobotDrive drive = new RobotDrive(1, 2);

You can also replace the 1, 2 with two Jaguar objects if that is what you're asking:

Jaguar jag1 = new Jaguar(1);
Jaguar jag2 = new Jaguar(2);
new RobotDrive(jag1, jag2);