View Single Post
  #4   Spotlight this post!  
Unread 05-03-2015, 23:05
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,653
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Limit speed of 4 chassis CIM motors

Oh, duh!

If you really want to limit acceleration, you can use the accelerometers built into the RoboRIO; just select the one oriented along the axis that you're driving, or a vector sum of them that points you that way. For example, if your RIO is laid out on a board 30 degrees from horizontal, with the USB end towards the front and elevated, your acceleration in the drive direction would be
Code:
driveAccel = accelYaxis.getAcceleration() * .866 + accelZaxis.getAcceleration() * 0.5;
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.