Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   How to assign buttons? (http://www.chiefdelphi.com/forums/showthread.php?t=81308)

Jester 27-01-2010 22:39

How to assign buttons?
 
I am the only programmer on my team and am completely lost.

I have the camera with 2 servos(mounted), but I want to make it able to move the servos with joystick buttons. I want to use buttons 2,3,4,5.

keehun 27-01-2010 22:40

Re: How to assign buttons?
 
Can you let us know what language you are using?

Vikesrock 27-01-2010 22:43

Re: How to assign buttons?
 
Quote:

Originally Posted by keehun (Post 908237)
Can you let us know what language you are using?

I'm going to assume he posted in the right forum and is using Labview.

What do you want the buttons to do to the servo positions? Do you want them to move the servos to some setpoint? Or increment the servo position some amount in a given direction?

Greg McKaskle 28-01-2010 07:45

Re: How to assign buttons?
 
Are you starting with the 2010 Sample code? If so, it already reads several joystick buttons. The computer I'm at doesn't have the latest code installed, but if you open the TeleOp.vi file and go to the diagram, you can follow where the joystick wire leads. It may be easiest to drop another Joystick Get function and unbundle the buttons. Wire the buttons to case structures that add, subtract, or leave the desired servo angle alone. Then wire the angle to the servo.

If you haven't already done it, you'll want to add the Servo Opens to Begin.vi, store the value under some named entries, and read the refnum back in TeleOp.vi.

If you are not sure what something does, open and read examples. Also, much of what you need is in the WPILib section of the menu, towards the bottom.

Greg McKaskle


All times are GMT -5. The time now is 11:58.

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