|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
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
|
||||
|
||||
|
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] I hope this helps. If I misunderstood the question, I blame the fact that I just woke up... |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |