View Single Post
  #4   Spotlight this post!  
Unread 03-11-2006, 11:30
T. Maty T. Maty is offline
Registered User
#1611 (Mustangs)
Team Role: Webmaster
 
Join Date: Mar 2005
Rookie Year: 2003
Location: Guyton, Ga.
Posts: 3
T. Maty is an unknown quantity at this point
Thumbs up Re: Need help with ramping in VEX EasyC

Thank you for your help, it worked great.

Team 1611

Quote:
Originally Posted by charrisTTI
The last example will solve the compile problem, but now I think you need to fix your logic.

for ( step1 = 0, step2 = 255 ; step1 < 127 && step2 > 127 ; step1 += 5, step2 += 5 )


If you want the motors to ramp from stopped to maximum speed in steps of 5, the statement would need to change to:

for ( step1 = 127, step2 = 127 ; step1 < 255 && step2 > 0 ; step1 += 5, step2 -= 5 )

You also need to consider that the system (the robot and motors) will not respond instantaneously to changes in pwm values. There needs to be some kind of delay between each new set values that are sent to the motors.