View unanswered posts | View active topics It is currently Tue Sep 16, 2014 1:53 am






Reply to topic  [ 4 posts ] 
Channels for new VEXnet Joystick. 
Author Message
Novice

Joined: Thu Oct 09, 2008 7:58 pm
Posts: 79
Post 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


Thu Jun 10, 2010 12:01 pm
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 405
Post 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.

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Tue Jun 29, 2010 9:24 am
Profile
Rookie

Joined: Fri Sep 04, 2009 3:03 pm
Posts: 10
Post 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!

_________________
Jordan Miller
2010 Dean's List Semi-Finalist
FRC 1741 --- Engineering Captain, Driver
Vex 323a --- Team Captain, Driver


Wed Aug 18, 2010 12:18 am
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 405
Post 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.

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Fri Sep 03, 2010 5:02 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: xinkecf35 and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.