Go to Post OMG are you saying we are going to have a question mark game element next, that would be crazy - Greg Needel [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-02-2016, 16:54
RadhikaTheFish's Avatar
RadhikaTheFish RadhikaTheFish is offline
Registered User
FRC #3815
 
Join Date: Jan 2016
Location: Georgia
Posts: 26
RadhikaTheFish is an unknown quantity at this point
Joystick Trouble

We programmed the robot for a four motor arcade drive, and the driver works fine. Though we'd like to be able to change which joystick it goes to, right now it goes to the left joystick, anybody know how to make it go to the right?
Reply With Quote
  #2   Spotlight this post!  
Unread 23-02-2016, 17:24
JeffB JeffB is offline
Registered User
FRC #5052 (RoboLobos)
Team Role: Mentor
 
Join Date: Apr 2015
Rookie Year: 2014
Location: Austin
Posts: 58
JeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to behold
Re: Joystick Trouble

You'll see joysticks in your driver station under the USB tab. You can use that to determine which port your joystick is plugged into or drag joysticks to the desired USB location.

In your begin VI, the joysticks are opened by USB location. The default setup has a joystick put at USB0. This is how you match the USB port for your joystick versus the USB you see in the driver station.
Reply With Quote
  #3   Spotlight this post!  
Unread 23-02-2016, 17:42
RadhikaTheFish's Avatar
RadhikaTheFish RadhikaTheFish is offline
Registered User
FRC #3815
 
Join Date: Jan 2016
Location: Georgia
Posts: 26
RadhikaTheFish is an unknown quantity at this point
Re: Joystick Trouble

I saw that the right joystick is USB4-5 yet when I changed it to that in Begin.VI I lost all control of the robot in total.
Reply With Quote
  #4   Spotlight this post!  
Unread 23-02-2016, 18:49
JeffB JeffB is offline
Registered User
FRC #5052 (RoboLobos)
Team Role: Mentor
 
Join Date: Apr 2015
Rookie Year: 2014
Location: Austin
Posts: 58
JeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to behold
Re: Joystick Trouble

It should only big a single USB. If you change to the USB number that matches, probe the wires in your code to make sure you're reading the values from your joystick in the code. If you see the values updating going into your various motor controllers, you should see some performance. If you're not seeing anything update here, there's something in the code that isn't quite right.

It'd be easier to know what you're doing with the relevant code available. I'm mostly guessing where you might run into issues.

By right joystick, do you mean you have two joysticks or you want the right joystick from an xbox controller? If that's the case, you'll want to leave the USB where it was and then use the "Index Array" to pull off elements 4 and 5 instead of 0 and 1. (I believe 0 and 1 are the left joystick). This gives you the X and Y axis from the right joystick so that you're able to use this joystick instead.
Reply With Quote
  #5   Spotlight this post!  
Unread 23-02-2016, 19:37
RadhikaTheFish's Avatar
RadhikaTheFish RadhikaTheFish is offline
Registered User
FRC #3815
 
Join Date: Jan 2016
Location: Georgia
Posts: 26
RadhikaTheFish is an unknown quantity at this point
Re: Joystick Trouble

Wot?
Attached Thumbnails
Click image for larger version

Name:	Bumpers get done.png
Views:	13
Size:	2.8 KB
ID:	20172  
Reply With Quote
  #6   Spotlight this post!  
Unread 24-02-2016, 09:12
JeffB JeffB is offline
Registered User
FRC #5052 (RoboLobos)
Team Role: Mentor
 
Join Date: Apr 2015
Rookie Year: 2014
Location: Austin
Posts: 58
JeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to beholdJeffB is a splendid one to behold
Re: Joystick Trouble

I've attached some code from Teleop. This is just the basic project. But, I've hovered over the Index Array function to show the blue squares at the top and bottom. When you see these, you can click on them and drag to expose more elements. The top element is axis 0. The second is axis 1. Etc.

You need to use this to get the axis for the right joystick on your controller.
Attached Thumbnails
Click image for larger version

Name:	joystick.PNG
Views:	9
Size:	6.9 KB
ID:	20180  
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 20:25.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi