View Single Post
  #8   Spotlight this post!  
Unread 10-04-2013, 22:23
Johnbot's Avatar
Johnbot Johnbot is offline
Es Brokein!
AKA: John Westhoff
FRC #4791 (Pandroids)
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2010
Location: Horsham, PA
Posts: 92
Johnbot is just really niceJohnbot is just really niceJohnbot is just really niceJohnbot is just really niceJohnbot is just really nice
Re: Xbox Controller Axis 3

Are you pressing both triggers at the same time? Because if so, that won't work.

What our team did to test the xbox controllers was something along the lines of this code:
Code:
for (int i = 1; i <= 6; i ++)
{
System.out.println("AXIS "+i +" READS "+joystick.getRawAxis(i);
}
If you run this in your teleop code, and monitor the NetConsole, you should see Axis 3 read a value of near 0when neither trigger is pressed, a value of near 1 when one trigger is pressed, and a value of near -1 when the other is pressed.
If you can confirm that Axis3 does behave in that manner, then joelg236's code should work with the addition of setting another solenoid when the value is > 0.7.
__________________

2011-2014 - FRC 2607 - Student
2012-2012 - FLL 2249 - Coach
2015- ???? - FRC 4791 - Mentor
Reply With Quote