View Single Post
  #5   Spotlight this post!  
Unread 16-02-2002, 18:24
Joseph F Joseph F is offline
Registered User
#0506 (Steel Friars)
 
Join Date: Jan 2002
Location: New York
Posts: 59
Joseph F is an unknown quantity at this point
Send a message via AIM to Joseph F
this is just off the top of my head... but i think it may go something like this...

If p1_y > p2_y then use1
pwm1 = p2_y
goto end

use1
pwm1=p1_y
end:


basically it takes whichever joystick is greater and uses that as the output to pwm1

you would have to edit the serout command so that it would read

[255,255,pwm1,relayA,p2_y,relayB,p3_y,p4_y,p1_x,p2_ x,p3_x,p4_x,p1_wheel,p2_wheel,p3_wheel,p4_wheel,12 7,127,127,127]

just remember if you did this you couldnt use pwm2 because p2_y would still control it as well as pwm1 if you went forward.
__________________
One Team, One Bot, One Fleet of Ambulances!