Go to Post The imperfect COTS parts you have in your shop will perform much better on the competition field than the perfect custom parts you only have CAD drawings for. - philso [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 24-02-2015, 08:03
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Using xbox thumbstick to control servos on pan/tilt

Like Alan, I'm not sure what you want, but here are the two things I'd suggest.

1. Instead of setting the servo to the X and Y values of the joystick, use them to increment the value of the servo. You'll want to have a shift register that is initialized to zero, and add a fraction of the joystick each time through the loop. Send that to the servos.

2. Only update the servo value based on a button.

I'm also testing to see if the code snippets work when attached like this, but they should at least show you what the code should look like.

Greg McKaskle
Attached Thumbnails
Click image for larger version

Name:	Servo Tilt Code.png
Views:	22
Size:	18.6 KB
ID:	18473  Click image for larger version

Name:	Servo Button Code.png
Views:	12
Size:	14.9 KB
ID:	18474  
Reply With Quote
 


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 21:23.

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