ROBOTC.net forums
http://robotc.net/forums/

Channels for new VEXnet Joystick.
http://robotc.net/forums/viewtopic.php?f=11&t=2416
Page 1 of 1

Author:  Sunny1261 [ Thu Jun 10, 2010 12:01 pm ]
Post subject:  Channels for new VEXnet Joystick.

Hello,

I would like to know how how to access a button press on the new VEXnet joystick. In the older controller, the buttons were Channels 5 and 6 and could be referred to as such, but how do we do it for the new ones?

- Sunny

Author:  jbflot [ Tue Jun 29, 2010 9:24 am ]
Post subject:  Re: Channels for new VEXnet Joystick.

To access button values in ROBOTC, the vexRT[] command is still used, but now you use the letters Btn, followed by the group number it belongs to… and finally the letter U, D, L, or R, depending on the buttons direction.

For example, if you wanted to access the value of the down button on the front-left of the remote control, you would use vexRT[Btn7D] short for vexRT Button Group 7 Down.

Author:  Dracco1993 [ Wed Aug 18, 2010 12:18 am ]
Post subject:  Re: Channels for new VEXnet Joystick.

Hello,

Thanks for your last post, I could not find what the buttons were called. I am now trying to run a motor off the press of a button. (Pressed --- full power/Released --- nothing) Here is an example of what I would like.

Code:
if (vexRT[Btn7d] ==  ??? )
   {
     motor(rightMotor) = 127;
   }
   else
   {
     motor(rightMotor) = 0;
   }


What would the "???" be in this example?

Thanks!

Author:  jbflot [ Fri Sep 03, 2010 5:02 pm ]
Post subject:  Re: Channels for new VEXnet Joystick.

When pressed, a button has a value of 1. When released, it has a value of 0. So in your example, the ??? would probably be 1.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/