![]() |
New to FRC Programming
Hello,
I'm very new to FRC programming and need help programming my team's robot because we don't have much time remaining. I've tried doing what I can but it doesn't work. My team has 6 Victors for the drive train and since the RobotDrive.class only support up to 4, I am unsure how to connect the other two. Also, when opening up SmartDashboard, no options for the autonomous commands display and I am unsure how to display it. My code has been uploaded to GiftHub: https://github.com/samrmur/FRCRobot/...rierRobot.java Thanks in Advance, Samer |
Re: New to FRC Programming
How are the 6 motors driving the wheels?
If any are in 2 motor gear boxes, then you can use a Pwm splitter to drive the two motor controllers. It will then look like one motor to the software. |
Re: New to FRC Programming
The PWM splitter is a great way to solve this problem.
If you don't have a PWM splitter and it will take you awhile to get one, you can use a software approach by adding a new SpeedControllerArray class to your project (shown below). This class controls an array of motors as if they were one. It is a simple implementation that expects that all of the motors turn the same direction (for example, if you want to set a power of .5 on one, you will be setting them all to .5). To use the SpeedControllerArray class in your Robot.java, you will need to create a SpeedControllerArray.java file with the code shown below in the same package as your Robot.java file and then change your RobotDrive construction from: Code:
RobotDrive driveRobot = new RobotDrive(frontLeft, backLeft, frontRight, backRight);Code:
SpeedController[] leftSideMotors = { frontLeft, middleLeft, backLeft };Code:
package org.usfirst.frc.team3756.robot; |
Re: New to FRC Programming
It worked, but today we figured out that the problem was not with the code, the wiring was messed up and the gear boxes are not working properly, thanks for the help
|
| All times are GMT -5. The time now is 08:38. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi