View Single Post
  #2   Spotlight this post!  
Unread 05-02-2014, 06:05
sasha831 sasha831 is offline
Sasha
FRC #4529 (AI Robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Australia
Posts: 35
sasha831 is an unknown quantity at this point
Re: How do you make a trim control?

Hello,

Are you attempting to limit the motor power through the throttle, or control the motor power entirely?

For the first one, since we get a value from -1 to 1, we need to scale it, by adding 1 and dividing by 2. Then Just multiply this value by the value you were sending into the motor controller.

For Controlling the motor entirely off the throttle, just feed in the value for 2-way control, or scale it as specified above for more precise 1-way control.

Hoped That Helped

Sasha
__________________
Theory is when you know everything but nothing works. Practice is everything works but no one knows why. On our Team, theory and practice are combined: nothing works and no one knows why!