![]() |
Arcade drive/Talon controller problems
Currently I'm still testing my program on a test bed which we have assembled that has 4 motors. Right now I have my program set up so that it initializes the robot with only two motors in its drive base and the other two for testing purposes. In our teleop stage I want to programmatically set it up so that when the A button on the controller is pressed one motor moves for a certain amount of time then stops so that the whole movement is automated. However, right now though the mechanism is supposedly programmatically working, the motors that are moving are the ones that I initialized as drive train motors (and the arcade drive doesn't work). Below is my code:
Code:
#include "WPILib.h" |
Re: Arcade drive/Talon controller problems
First of all, the l_motor(1.0) call doesn't work because to drive the motor, you need to use the set function: l_motor.Set(1.0). What you have is meaningless, as l_motor is an object, not a function.
As for the arcade drive, I would try first using the ArcadeDrive function with constant inputs (ie ArcadeDrive(1.0, 0.0) ) and see what happens. That way you know the issue isn't with your joystick. It looks like you're using Talons for everything, but if the drive motors aren't talons then the way you initialized dragonBot won't work. For testing purposes, don't bother with all the loops and timing; just try to run the motor if the button is pressed. The more complicated the code, the harder it is to find what's wrong. |
Re: Arcade drive/Talon controller problems
Quote:
|
| All times are GMT -5. The time now is 09:50 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi