ROBOTC.net forums
http://robotc.net/forums/

Motor Scaling
http://robotc.net/forums/viewtopic.php?f=1&t=5519
Page 1 of 1

Author:  Xavier Robotics 6064 [ Tue Feb 19, 2013 8:36 pm ]
Post subject:  Motor Scaling

I have 2 DC Motors controlling an arm,but they are too powerful, how do I decrease the amount of power they use without having to focus on how much I move the analog stick?

Thank You!!~

Author:  mightor [ Wed Feb 20, 2013 12:53 am ]
Post subject:  Re: Motor Scaling

You could clip or scale the values. Clipping is the easiest. I have a function in my Driver Suite called clip:
Code:
#define min2(a, b) (a < b ? a : b)
#define max2(a, b) (a > b ? a : b)
#define clip(a, b, c) min2(c, max2(b, a))

To find out how to scale values, I would say: "Use the Omniscient Google."

= Xander

Author:  MHTS [ Thu Feb 21, 2013 1:46 am ]
Post subject:  Re: Motor Scaling

Alternative, you can just scale down the motor power. For example,
Code:
motor[motorA] = joystick.joy1_y1/3;

Author:  Xavier Robotics 6064 [ Fri Mar 01, 2013 5:55 pm ]
Post subject:  Re: Motor Scaling

MHTS wrote:
Alternative, you can just scale down the motor power. For example,
Code:
motor[motorA] = joystick.joy1_y1/3;

That doesn't seem to effect the speed of the robot. But, I will try clipping.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/