|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#1
|
||||
|
||||
|
Hello my name is Justin lead programmer for the Walt Whitman RoboCats in Huntington Station, NY. I recently started programming with the new labview software for the RoboRIO. I am so used to unbundling by name for the joystick buttons and axis, i have no idea how to program using an index array. How would i set up a tank drive configuration using the index array and set up a relay to a button on an xbox controller.
Thanks. |
|
#2
|
||||||
|
||||||
|
Re: Labview 2015 joystick help!
Have you seen this? http://wpilib.screenstepslive.com/s/...e-2014-to-2015
|
|
#3
|
|||
|
|||
|
Re: Labview 2015 joystick help!
Additionally, the robot template code contains a simple teleop that indexes the first two axes from a single joystick/game controller and send it to the arcade driving. In most respects, it is the same. The index array is a growable node. You can wire in a number to each row, telling it what element to return, or if left unwired, it will increment based on the previous row.
Greg McKaskle |
|
#4
|
||||
|
||||
|
Re: Labview 2015 joystick help!
there are three arrays axis,buttons,POV. What does POV stand for?
|
|
#5
|
|||||
|
|||||
|
Re: Labview 2015 joystick help!
|
|
#6
|
||||
|
||||
|
Re: Labview 2015 joystick help!
Quote:
Do you happen to have a screen shot of what the drive code should look like for the 360? |
|
#7
|
|||
|
|||
|
Re: Labview 2015 joystick help!
The drive code for TeleOp takes whichever joystick axes you intend to use, potentially scales or conditions them, and sends them to RobotDrive.
Assuming you have a skid-steer robot such as the KoP, the first decision is whether you want a tank, where left and right axes drive the left and right wheels directly much like a tank, a bobcat, or a bulldozer. Or whether you want two generally orthogonal axes that are mixed to determine the left and right motor speeds. This feels much more like video game joystick driving with left/right inputs steering and forward/back inputs going front and back. Once you have decided that, choose which axes from the 360 controller that you want to use. It may be useful to use the USB tab of the DS to identify the numbers. Then on the TeleOp diagram, index out those elements from the Axes array. Wire those into the RobotDrive that you choose to use. Greg McKaskle |
|
#8
|
|||||
|
|||||
|
Re: Labview 2015 joystick help!
Here's an example using Axis 1 & 5 to tank drive with an xBox contoller.
![]() |
|
#9
|
||||
|
||||
|
Re: Labview 2015 joystick help!
Mark,
Do you have a similiar picture for the F310 Logitech gamepad controller? |
|
#10
|
|||||
|
|||||
|
Re: Labview 2015 joystick help!
Quote:
Choose the USB tab at the left, and select the gamepad in the list. The axes and buttons will show up to the right of the selected controller. |
|
#11
|
|||||
|
|||||
|
Re: Labview 2015 joystick help!
Quote:
http://www.team358.org/files/program...019/#joysticks The F310 has a couple of optional settings. |
|
#12
|
||||
|
||||
|
Re: Labview 2015 joystick help!
A problem I ran into last night, is the xbox controller, has 10 buttons from 0-9, but in the code the button array only has 9 elements from 0-8 . . .
So how do we program control on button9... Sorry to highjack thread, but this seem a fitting place to ask the question. Started New Thread, please follow here. http://www.chiefdelphi.com/forums/sh...72&postcount=1 Last edited by tr6scott : 21-01-2015 at 15:42. Reason: Started new Thread. |
|
#13
|
|||
|
|||
|
Re: Labview 2015 joystick help!
Here you go:
![]() In case anyone was wondering, you can use an array to cluster converter to connect to unbundle by name to get your buttons. |
|
#14
|
|||
|
|||
|
Re: Labview 2015 joystick help!
Regarding the "Set Output" of the joystick I am trying to light up an indicator using the Launchpad that was included in last years kit and I can't for the life of me figure out how to wire this up in Labview.
So say for instance I want to light a LED on the launchpad Red or Blue depending on what alliance we are on. Anyone have any ideas on how do do that? |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|