Go to Post If winning that individual match is more important to you than being there in the first place, then I believe you've got your priorities in the wrong spot. - Tom Bottiglieri [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
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 15-02-2016, 18:24
ICE_Bear ICE_Bear is offline
Registered User
FRC #5875 (ICE)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Northern Nevada
Posts: 72
ICE_Bear is an unknown quantity at this point
New Button

How do you program the POV on the Logitech joystick to move one motor using lab view?
Reply With Quote
  #2   Spotlight this post!  
Unread 15-02-2016, 21:40
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: New Button

The POV value represents the direction the POV control is being pressed, in compass degrees. It'll be -1 with nothing pressed. I think the Logitech will give values in 45 degree increments.

So what you want to do is wire the POV value to the select terminal of a case structure. If you want "up" to move the motor forward, add a case labeled "0" and put the code to run the motor forward in it. If you want "down" to move the motor backward, add a case labeled "180" and put the code to run the motor backward in it. Add a case named "-1", make it the default, and put code to stop the motor in it.

Instead of doing a Motor Set inside each case, it would probably be better to just put motor speed constants in the cases, wiring them all out of the case block to a single Motor Set function.
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 22:06.

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