View Single Post
  #16   Spotlight this post!  
Unread 10-01-2013, 12:05
ctccromer's Avatar
ctccromer ctccromer is offline
Animus
AKA: Tucker Campbell
FRC #3753 (Bulah Bots)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Baton Rouge, Louisiana
Posts: 190
ctccromer is a name known to allctccromer is a name known to allctccromer is a name known to allctccromer is a name known to allctccromer is a name known to allctccromer is a name known to all
Re: Using a (Logitech) Controller?

Quote:
Originally Posted by Mark McLeod View Post
Your program is only a sub vi and won't perform on it's own.
It's missing some essential stuff like communication with the Driver Station that reads the joystick.
You also need to have the Driver Station app running along with your LabVIEW session.

It would be easiest if you created a default robot project, from the Getting Started window, then added your code to the project.
The default project has most of what you need already, including one joystick.
We can walk you through the steps to take. For example,
  1. Create a Robot Project (inserting your team number into the IP address)
  2. Expand the Team Code folder
  3. Edit the Teleop.vi block diagram
  4. To begin with use just the Joystick that is already there to display it's buttons.
  5. Open the Robot Main.vi
  6. Press the Run arrow to start your project
  7. Plug your game controller into your laptop
  8. Start the Driver Station app.
  9. Go to the Driver Station Setup tab and see if the game controller is listed on the right in the first/top position. If not then click and drag it up to the USB 1 spot.
  10. Enable the Driver Station.
  11. Go to the Teleop front panel to see your button displays.

This is the general format to use a joystick


Take a look at some of the NI tutorials at: https://decibel.ni.com/content/docs/DOC-8923
The [FRC 2013] FRC Robot Framework Tutorial would be a start.
Thanks for the detailed help! I tried doing this however, after I deploy the code to the cRIO and open the drive station, it says I lose connection with the cRIO and boots me. Happened two times so far but I'll try it more with another cable after school.
Also, running RobotMain.vi does not show the lights that I linked to the 12 buttons of joystick 1 in teleop. Should I run teleop.vi instead of RobotMain.vi?
__________________
Team 3753 BulahBots
Reply With Quote