View Single Post
  #13   Spotlight this post!  
Unread 18-01-2007, 13:41
Bob22341 Bob22341 is offline
Registered User
FRC #1870
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Alberta
Posts: 48
Bob22341 will become famous soon enough
Re: Slow down teh motors!

I did this a couple of days ago. here's the jist of it:

if (buttonpressed)
motorspeed = transmission
else
motorspeed = joystickinput


transmission(){
speed -= 127;
speed /= divider;
speed +=127;
}

p.s. you'll have to modify this to make it work with your robot, but this should help you. Also, in binary, division is better than multiplication for using the transmission.

{edit}
you can have the motors running through the transmission normally, and have when the buttonpressed equals transmission bypass. Have fun playing around with it.
{/edit}

Last edited by Bob22341 : 18-01-2007 at 13:43.