I have found many post’s but no answers on this subject.
Please dont give me outside links or links to other topics here
I would just like to know how to spesifiy witch button on the joystick i am useing.
Thanks,
1141
I have found many post’s but no answers on this subject.
Please dont give me outside links or links to other topics here
I would just like to know how to spesifiy witch button on the joystick i am useing.
Thanks,
1141
Right click on the “Buttons” cluster – Go to the "Cluster Pallette – Click unbundle – wire that to the Button out – wire to the button you want.
Hope that helps.
Here’s a bit more of a visual in case you’re using the basic framework (Pretty much what DHR2o said):
Go to your palette and go to “WPI Robotics Library” > “DriverStation” > “Joystick” and add a “Get.vi” … hook it up to the connector shown below:
http://img67.imageshack.us/img67/8347/14362791jd3.jpg
Go to your palette and go to “Programming” > “Cluster, Class & Variant” and add an “Unbundle by name”. Hook it up to the pink output of the get VI as shown below:
http://img103.imageshack.us/img103/8862/22256183hc3.jpg
http://img210.imageshack.us/img210/6330/66729433lu4.jpg
Now from the cluster outputs you have access to all of the buttons.
http://img210.imageshack.us/img210/8317/66086042tt4.jpg
Good luck!
Thanks, me and the other programer found a salution but this is alot better.
wait, what’s the difference between using get and get raw for the buttons?
As far as the buttons go, nothing. The only difference I know of is the joystick axis output ranges from like -30000 something to +30000 something in increments of 256 or 512 or something around there…
lol, k. thanks.
The joystick ranges from -1 to 0 to 1. If it is scaled to 127 (which it is set to by default) then the joystick ranges from -127 to 0 to 127. Which gives you a more finer control over a motor.
Ah, that’s right… When I wrote that I was thinking about the preseason when we had a joystick hooked up to the computer directly and got input through the computer… My bad.
what is the joystick axis output?? it is really -1 to 1??? or is it 0 to 256 or -158 to 158
-1 to 1. If you have a running system, don’t forget that in LV you can open the panel and watch the values as they flow through. Many times that is a good way to understand the values being sent.
Greg McKaskle
I want to program in a way that when i press the trigger the motor works at half speed…
I don’t know how to do it… I did a little bit of the steps that were mentioned above and it really didn’t help. So can you tell me how to do it??
If you can provide pictures with that I would really appreciate…
Thank you…
Mohit
Create a case structure. Wire the button input to the case structure’s “?” node. Then make the “True” case have a 0.5 constant in it. Make the “False” case have a 0 constant in it. Wire both the constants out of the case structure to the Set Motor VI. Voila!
Thank you for the help…
I’ll let you know if it works once I get to school tommorow and start working on it…
Here’s a shot of something that doesn’t do exactly what you want, but it’s close and easily modifyable … our trigger overrides the throttle and sets it to full speed.
In the pic, the case structure shows the FALSE case, where the throttle goes straight thru, but when button 1 is pressed, the TRUE case has a hard constant 1.0 wired up into the throttle output of that case structure, ignoring the actual joystick throttle until the button is released.
In your case, you’d wanna’ wire up a 0.5 constant to it, if you want half-speed.