Go to Post Making GP a rule would be the equivalent of making a law that says you have to help get kittens out of trees. - Molten [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Spotlight this post!  
Unread 14-02-2010, 14:46
buddyb's Avatar
buddyb buddyb is offline
Registered User
FRC #1885 (ILITE)
Team Role: Programmer
 
Join Date: Dec 2009
Rookie Year: 2008
Location: Haymarket, VA
Posts: 65
buddyb has a spectacular aura aboutbuddyb has a spectacular aura aboutbuddyb has a spectacular aura about
Re: Motor Code Help

Quote:
Originally Posted by odel View Post
But I need two joysticks running 4 motors, 2 motors to each joystick.
Like ByteIt said, you'll want to do robotDrive.TankDrive(leftJoystick, rightJoystick);

But, the constructor you'll want to use is:
Code:
RobotDrive(SpeedController *frontLeftMotor, SpeedController *rearLeftMotor, SpeedController *frontRightMotor, SpeedController *rearRightMotor, float sensitivity=0.5)
This will give you tank drive for 4 motors from two joysticks.

Good luck!
__________________
FRC - Team 1885 - Programmer.

Last edited by buddyb : 14-02-2010 at 14:49.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
4 motor Mecanum wheel code request inventor1254 NI LabVIEW 17 23-02-2010 08:45
ADC code effecting motor outs??? Kyveck Programming 16 28-03-2006 15:12
Adding a motor to code sirbleedsalot Programming 1 27-01-2005 23:02
hey need some help with writing a code please help me here magical hands Programming 9 01-01-2004 21:46


All times are GMT -5. The time now is 13:36.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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