View Single Post
  #10   Spotlight this post!  
Unread 29-02-2012, 17:08
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: Programming Mecanum Wheels - 4 Victors

Quote:
Originally Posted by Unforgiven_Hero View Post
if I have lets say a jaguar powering a belt that moves the ball, how could I go about programming that? I'm lost on how to control motors that does not involve the wheels.
How do you control the Jaguar? By PWM or by CAN bus. Let me assume you are using PWM. Then it would look something like this:
Code:
Jaguar *beltMotor;
...
beltMotor = new Jaguar(1);  //assuming PWM channel 1
...
beltMotor->Set(1.0);  //turning one way full speed
beltMotor->Set(-1.0); //turning the other way full speed
beltMotor->Set(0.0);  //stop
__________________
Reply With Quote