![]() |
Coding for CIM Motor help
1 Attachment(s)
Hello, I am the new programmer for my team, but I'm not all that great yet.
Right now I have to code to make our CIM motor's drive. I have to make it so that the left motors are controlled by the left joystick and right motors to be controlled by the right joy stick. This is my question. I've been coding for tank drive, but would arcade be easier? This is the code I have. |
Re: Coding for CIM Motor help
Typically teams use tank drive but it is really personal choice, i belive you could simplify your code a bit to by using:
Your Mainclass: Code:
RobotDrive drive;Code:
drive = new RobotDrive(1,2,3,4); // Four motors on pwm You can replace with CANJaguars too.Code:
drive.tankDrive(left.getY(), right.getY());Code:
drive.arcadeDrive(left.getY(), left.getX()); // your Y val is your speed and the X value is your turning |
Re: Coding for CIM Motor help
Quote:
|
Re: Coding for CIM Motor help
Quote:
|
| All times are GMT -5. The time now is 22:21. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi