View Single Post
  #1   Spotlight this post!  
Unread 06-02-2015, 16:21
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,654
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: Slowing down the drive motors

Quote:
Originally Posted by notmattlythgoe View Post
Change this line:
Code:
myRobot.tankDrive(stick1,stick2);
to this:
Code:
myRobot.tankDrive(stick1.getY() * 0.5, stick2.getY() * 0.5);
Then change the 0.5 to some scalar value depending on how much you want to scale it.
A simple way to still allow full top speed but give fine control at low speeds is to square the magnitude. You'll get 1/4 speed at half throw on your joystick, and full speed at full throw:

Code:
myRobot.tankDrive(stick1.getY() * Math.abs(stick1.getY()),
stick2.getY() * Math.abs(stick2.getY());
__________________

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.
Reply With Quote