So we are using the new command based structure and trying to program a simple bot to move forward. The problem is the robot only has two motors, and we’ve only ever programmed using a 4 motor drive. Here is our code:
Any help would be appreciated!
So we are using the new command based structure and trying to program a simple bot to move forward. The problem is the robot only has two motors, and we’ve only ever programmed using a 4 motor drive. Here is our code:
Any help would be appreciated!
Is there any specific problem you are having? Your code looks like it should work.
Well it runs fine, but when I’m moving the joysticks forward/backwards, nothing is happening
Hmm your code looks alright to me.
Are you sure your talon id’s are 1 and 2 for the two drive motors and that you have the right axis numbers for the joysticks?
2 motor drive is actually less work than 4. Instead of using speed controller groups, just put through directly the speed controller object. Your code looks fine but I would check your motor values. Using the Phoenix tuner you can flash the motor leds and get the value you desire!
Your Robot.robotInit() method is not creating the RobotContainer.
Hope this helps,
Steve
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.