![]() |
Motor Code Help
Hi, I would like to do something like:
Joystick1yaxis = Motor[1]; Joystick1yaxis = Motor[2]; Joystick2yaxis = Motor[3]; Joystick2yaxis = Motor[4]; how would I go about this? Thanks :D |
Re: Motor Code Help
have you read http://first.wpi.edu/Images/CMS/Firs...artedWithC.pdf and http://first.wpi.edu/Images/CMS/Firs...sers_Guide.pdf?
I would assume you want something more like this: Code:
robotDrive.TankDrive(stick1,stick2); |
Re: Motor Code Help
But I need two joysticks running 4 motors, 2 motors to each joystick.
|
Re: Motor Code Help
Quote:
But, the constructor you'll want to use is: Code:
RobotDrive(SpeedController *frontLeftMotor, SpeedController *rearLeftMotor, SpeedController *frontRightMotor, SpeedController *rearRightMotor, float sensitivity=0.5)Good luck! :) |
Re: Motor Code Help
So now I have:
Code:
class RobotDemo : public SimpleRobot |
Re: Motor Code Help
Quote:
Code:
#include "WPILib.h" |
Re: Motor Code Help
So this is what I have right now, we plugged the left motors into pwm 1 and the right ones into pwm 2 using pwm splitter, and still no luck
Code:
#include "WPILib.h" |
Re: Motor Code Help
are the joysticks configured correctly on the driverstation?
go to setup tab, and on the right side, drag the joysticks to 1 and 2 |
Re: Motor Code Help
Got things working now, thanks for all the help guys!
|
Re: Motor Code Help
might i suggest using an ancient technology of split PWM's the go from one port to 2 jaguars or victors. they are extremely helpful.
|
Re: Motor Code Help
Quote:
|
| All times are GMT -5. The time now is 12:21. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi