View Single Post
  #2   Spotlight this post!  
Unread 17-10-2013, 21:18
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: How do I use Robotdrive.h?

Let's say you have the leftDriveStick and the rightDriveStick. The right stick X and Y will be the forward/backward and strafe. The left stick X will be the rotate.
Code:
Joystick leftStick;
Joystick rightStick;
RobotDrive robotDrive;
 
float x = DEAD_BAND(rightStick.GetX());
float y = DEAD_BAND(rightStick.GetY());
float rot = DEAD_BAND(leftStick.GetX());
 
robotDrive.MecanumDrive_Cartesian(x, y, rot);
__________________

Last edited by mikets : 17-10-2013 at 21:21.
Reply With Quote