|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Help ME PLEASE ASAP
Add one of these to the end }
|
|
#2
|
|||
|
|||
|
Re: Help ME PLEASE ASAP
and the code will work?
|
|
#3
|
||||
|
||||
|
Re: Help ME PLEASE ASAP
Code:
RobotDrive drive = new RobotDrive(1,2,3,4); Talon frontLeft = new Talon(4); Talon rearLeft = new Talon(3); Talon frontRight = new Talon(2); Talon rearRight = new Talon(1); You need to do one or the other, but not both. Doing this will throw an error saying you are declaring and initializing all your drivetrain Talons twice. Pick which way you want to program your robot: either using the simpler RobotDrive object, or by manually coding commands to your individual Talons, then delete all the code for the method you are not using. In the future, it is also a good idea to post a description of the problem you are encountering, including any exceptions or errors messages. |
|
#4
|
||||
|
||||
|
Re: Help ME PLEASE ASAP
Quote:
Code:
Talon = new Talon(0) Talon2 = new Talon(1) Talon3 = new Talon(2) Talon4 = new Talon(3) drive = new Robotdrive(Talon, Talon2, Talon3, Talon4) |
|
#5
|
|||
|
|||
|
Thanks Guys
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|