Go to Post Joining a FIRST team is the beginning of "smart," not the culmination. - klrswift [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-10-2003, 11:09
wayne 05 wayne 05 is offline
Registered User
#0515
 
Join Date: Sep 2003
Location: gm tech center
Posts: 17
wayne 05 is an unknown quantity at this point
pwm 13-15

while using the one joystick control code can drive_R and drive_L be used indvidualy like p1_y and p1_x in order to use pwm 13 & 15 indpendently

example: in the one joy stick control code it combides p1_y and p1_x to drive_R and drive_L

drive_r = pwm 13and pwm 15
drive_L = pwm 16 and pwm 14
my motors a on pwm 15 and pwm 13


i want to use pwms 13And 15 for drive motor and no pwms 1and 2

Last edited by wayne 05 : 04-10-2003 at 12:28.
  #2   Spotlight this post!  
Unread 04-10-2003, 11:58
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
If I understand your question correctly, yes and its easy to do, there is a simple trick to it.

If you drive the left motor with P1_y and the right motor with P1_x

then all you need to do is turn your joystick 45° on the control panel. (the whole joystick unit, so instead of being oriented like a square, its looks like a diamond)

then, what use to be the upper right corner of the joystick travel will become straight ahead (both motors on full) and what use to be the lower left corner becomes full astern.

the only drawback is the handle on the joystick is rotated, so the buttons are awkward to use.

Last edited by KenWittlief : 04-10-2003 at 12:00.
  #3   Spotlight this post!  
Unread 04-10-2003, 12:08
FotoPlasma FotoPlasma is offline
\: |
no team
 
Join Date: Jul 2001
Rookie Year: 2001
Location: San Jose
Posts: 1,900
FotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond repute
Send a message via AIM to FotoPlasma
If I understand you correctly, you want the drive_L variable to be used for both PWM16 and PWM14, and the drive_R to be used for PWM13 and PWM15.

One way you could do this is to place each of those two variables (drive_L and drive_R) into the positions for each of the two PWM outputs in the SEROUT command.
Code:
'  Serout USERCPU, OUTBAUD, [255,255,(PWM1),relayA,(PWM2),relayB,(PWM3),(PWM4),(PWM5),(PWM6),(PWM7),(PWM8),(PWM9),(PWM10),(PWM11),(PWM12),(PWM13),(PWM14),(PWM15),(PWM16),(OSC)]

   SEROUT USERCPU, OUTBAUD, [255,255,127,relayA,127,relayB,127,127,127,127,127,127,127,127,127,127,drive_R,drive_L,drive_R,drive_L]
The first line is the example SEROUT that IFI provides in the default 2003 EduRC code, so what I did was place the drive_L and drive_R variables in the string of output bytes where the system will be expecting PWM[13-16]. I set all other PWM values to 127, but you can replace these with whatever you'd like.

I hope this helps. If I misunderstood the question, I blame the fact that I just woke up...
__________________
I played hacky sack with Andy Baker.

2001-2004: Team 258, The Sea Dawgs
2005: Team 1693, The Robo Lobos
Closed Thread


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
PWM and burning out motors patrickrd Technical Discussion 7 19-06-2003 15:30
Limiting PWM in pbasic archiver 2001 4 24-06-2002 00:38
Ugh...PWM pin vs. Speed Controller archiver 2001 1 24-06-2002 00:27
Loss of signal in PWM cables. archiver 2001 6 23-06-2002 23:29
PWM Wires... Anton Abaya Technical Discussion 3 04-02-2002 05:07


All times are GMT -5. The time now is 16:14.

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