Thread: 4 Motor Drive
View Single Post
  #2   Spotlight this post!  
Unread 06-02-2010, 13:35
phencer42's Avatar
phencer42 phencer42 is offline
Registered User
FRC #1517 (P4)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2005
Location: NH
Posts: 40
phencer42 is on a distinguished road
Send a message via MSN to phencer42
Re: 4 Motor Drive

Start with the given Simple Robot Template and add the import "edu.wpi.first.wpilibj.*"

Then add
Code:
    RobotDrive drive = new RobotDrive(1,2,3,4);
    Joystick leftStick = new Joystick(1);
    Joystick rightStick = new Joystick(2);
under "public class RobotTemplate extends SimpleRobot"

Then add
Code:
drive.tankDrive(leftStick,rightStick);
under "public void operatorControl()".

This will give you a tank drive system for a four motor robot with front left motor in port 1, back left in port 2, front right in port 3, and rear right in port 4 using the left joystick in port 1 and the right joystick in port 2. Best of luck
__________________
Study=No Fail
No Study=Fail
No Study+Study=No Fail+Fail
(No+1)Study=(No+1)Fail
Study=Fail
Reply With Quote