Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Circle Tracker Demo (http://www.chiefdelphi.com/forums/showthread.php?t=82711)

nomad725 02-15-2010 11:31 AM

Circle Tracker Demo
 
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 02-16-2010 04:10 PM

Re: Circle Tracker Demo
 
Quote:

Originally Posted by nomad725 (Post 920427)
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);


All times are GMT -5. The time now is 08:30 AM.

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