View Single Post
  #2   Spotlight this post!  
Unread 02-16-2010, 04:10 PM
BradAMiller BradAMiller is online now
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 587
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Circle Tracker Demo

Quote:
Originally Posted by nomad725 View Post
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);
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote