|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Any button other than joystick 2 making motor controlled by talon
If I use any buttons other than the joystick's 2 buttons (named them left and right, 3 and 4 don't work; 3 and 4 or 7 and 8 don't work on the gamepad, named gamepad.)
Any idea why this would happen? One direction it doesn't work at all, the other it works but goes off and on and generally moves very slowly. Also tried axis one of the gamepad. |
|
#2
|
||||
|
||||
|
Re: Any button other than joystick 2 making motor controlled by talon
Could you post your code?
|
|
#3
|
||||
|
||||
|
Re: Any button other than joystick 2 making motor controlled by talon
Sorry, don't know why I didn't.
Spoiler for isthisatitle?:
This code is working, but we want to move the buttons to run it from joysticks to the gamepad: Code:
if(left.getRawButton(2))
{
ballpickup.set(-1);
}
if(right.getRawButton(2))
{
ballpickup.set(1);
}
|
|
#4
|
||||
|
||||
|
Re: Any button other than joystick 2 making motor controlled by talon
UPDATE: Tried changing pwm to 5, it happens with any type of motor that I tested, it is only happening with ballpickup though, any statements of what I could be doing wrong, or information I have not provided would be nice.
EDIT: To make things stranger, setting it to a value in autonomous works perfectly fine. Last edited by sthreet : 02-27-2014 at 04:37 PM. |
|
#5
|
||||
|
||||
|
Re: Any button other than joystick 2 making motor controlled by talon
EDIT: I facepalm myself:
Code:
if(!right.getRawButton(2) && !left.getRawButton(2))
{
ballpickup.set(0);
}
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|