Thread: tank steering
View Single Post
  #11   Spotlight this post!  
Unread 23-06-2002, 22:28
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Re: tank steering

Posted by Jerry Eckert.

Engineer from Looking for a team in Raleigh, NC sponsored by .

Posted on 1/10/2000 6:27 PM MST


In Reply to: tank steering posted by vectorevil@aol.com on 1/10/2000 5:57 PM MST:



: I was wondering if anyone could share the modifications to the control program that are nessisary to control two motors with 1 joystick to provide 'tank style' steering. (To drive 2 independant motors fwd when the y-axis is at full, in rev. when the y-axis is at minimum, and in opposite directions when the x-axis is used.) I was told at kick off that this was a common style of control and that in the past the coding to do this was in the manual. But i could not find this coding in the manual and p-basic is new to me and my students.

Here are the code fragments from last year's control program:

Serout SSC, SSCBAUD, [SSC_CMD, PWM1, (((2000 + y1 - x1 + 127) Min 2000 Max 2254) - 2000)]
Serout SSC, SSCBAUD, [SSC_CMD, PWM2, (((2000 + y1 + x1 - 127) Min 2000 Max 2254) - 2000)]


Y1 and X1 are the Y and X inputs from the joystick.
PWM1 controls the left motor
PWM2 controls the right motor

The competition manual from last year is still on-line at the FIRST web site. Click on the link below to download the section which contains the control program information. It will explain the reason for using the 2000 offset and the MIN/MAX statements.

If you have any questions, feel free to send me E-mail.

Jerry



__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.