Thread: speed control
View Single Post
  #11   Spotlight this post!  
Unread 24-01-2002, 16:12
punarhero's Avatar
punarhero punarhero is offline
Registered User
#0696 (Clark Magnet Robotics)
Team Role: Programmer
 
Join Date: Jan 2002
Location: la crescenta
Posts: 67
punarhero is an unknown quantity at this point
Send a message via AIM to punarhero Send a message via Yahoo to punarhero
i want to change speed

But how can I change the rate at which the motor accelerates. For example, I need to move the joystick almost all the way forward to make the motor run at its max. speed. What if I want the motor to get to its max speed only half-way on the joystick.

I tried writing a loop for it like so:

FOR pi_y=127 TO 254
p1_y=P1_y*2

I was hoping to make the motor go accelerate at double rate than before, but when I run it, the motor started running at full speed aytomatically, I couldn't control it from the joystick anymore.

So, what modifications or additions should I make to my program to control the acceleration of the motor