Go to Post Give us six more motors in the kit, and we'll try and come up with something... - Karthik [more]
Home
Go Back   Chief Delphi > Technical > Programming
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
  #3   Spotlight this post!  
Unread 02-02-2008, 14:32
jacobhurwitz jacobhurwitz is offline
Registered User
FRC #0449 (Blair Robot Project)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Maryland
Posts: 45
jacobhurwitz has a spectacular aura aboutjacobhurwitz has a spectacular aura aboutjacobhurwitz has a spectacular aura about
Re: Default code??

Quote:
Originally Posted by RRA4LIFE2 View Post
We are a rookie team, team 2595. We want to use the default code that we got but don't know if it'll work. We are running a 2 motor drive and the default code is a 4 motor drive???
How do we change the default code to work for teleoperated for a 2 motor drive?
With MPLAB, the following should work for tank drive:

Code:
pwm01 = pwm02 = p1_y;
pwm03 = pwm04 = p2_y;
This assumes pwms 1 and 2 are the left wheels and port 1 is the left joystick; pwms 3 and 4 are the right wheels, and port 2 is the right joystick.

When both joysticks are forwards, all motors are forward and the robot goes forward. When both are back, the robot goes backwards. When one joystick is forward and one is backwards, the left and right motors move in opposite directions and the robot twists clockwise or counterclockwise.
 


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
Problems integrating CMUCAM code and IFI Default Code Windward Programming 2 06-02-2007 16:48
Modified default code gives "code violation" scottmso Programming 8 10-02-2006 23:17
problems using gyro/adc code with camera default code tanstaafl Programming 7 22-01-2006 23:09
user code to default code phoenixomega001 Programming 5 09-01-2005 00:09
Inserting Naviagation code into Default code? actorindp Programming 3 28-01-2004 18:12


All times are GMT -5. The time now is 19:12.

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