View Single Post
  #14   Spotlight this post!  
Unread 18-01-2007, 14:35
Ted Weisse's Avatar
Ted Weisse Ted Weisse is offline
Registered User
AKA: xMentor/Inspector/Referee
no team
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Green Bay, WI
Posts: 106
Ted Weisse is a glorious beacon of lightTed Weisse is a glorious beacon of lightTed Weisse is a glorious beacon of lightTed Weisse is a glorious beacon of lightTed Weisse is a glorious beacon of light
Re: Slow down teh motors!

A dead zone is a very good idea for your input controls. If you establish this zone in the input from 125-129 on each input it helps, keeps from jerking the drive back and forth. Test if the input is in the zone and if true set the value to 127, if not then the input value would be used as Full_Speed. Now set scaled values for speeds such as ½ by using the value of Full_Speed. Therefore: Half_Speed = 127 - ( 127 - Full_Speed ) / 2. You would need to do this for each side/motor. If you wanted ¼ speed just divide by 4 instead of 2 and so on. Now test for the inputs of the triggers and set the output to the desired value either the Full_Speed or Half_Speed results. This has been tested and works, hope it helps. Remember you can test for either trigger or even both to form an “AND” so you can have multiple speeds.
__________________
If I am not for myself, who will be for me?
If I am not for others, what am I?
And if not now, when?

-Rabbi Hillel
Jewish scholar & theologian (30 BC - 9 AD)

Last edited by Ted Weisse : 18-01-2007 at 21:28. Reason: edit signature