Go to Post Act humble, avoid hubris, and post widely and thou shalt receivith postive rep. ;) - artdutra04 [more]
Home
Go Back   Chief Delphi > Technical > Programming
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
  #2   Spotlight this post!  
Unread 12-02-2006, 21:17
rushrtr3 rushrtr3 is offline
Registered User
FRC #0131
 
Join Date: Dec 2005
Location: Manchester NH
Posts: 2
rushrtr3 is an unknown quantity at this point
Re: Help with joystick

You will first have to assign each of the buttons as a digital input. In the browser, expand the RC Control browser. Then drag a Digital OI Input into your program were it can be accessed by the fuction you want it to accomplish. Choose the port that the joystick is plugged into and then choose the button number. 1=Trigger, 2=Thumb, 3=Aux1 (the left button) 4=Aux2 (the right button). As far as I know you can't use the easyC program to use the little joystick. You will need to make a variable for the digital input to retrieve to. Make the varriable an "unsigned char". I'm not sure what you want the buttons to do with the motors but the basic idea is to make so that if xxxxxx (your digital inputs variable) = 1 set pwm to yyyyy (the motors speed). NOTE: the buttons read as 1 if they are pressed, if you release them they go back to 0. Hope this helps.
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change joystick to pwm mapping Joe Lewis Programming 3 30-03-2005 19:27
Changing 1 joystick code to 2 (rookie team) Brawler006 Programming 5 20-02-2004 17:00
robot goes haywire with the one joystick default code Miles Programming 7 24-01-2003 14:58
joystick problem archiver 2000 12 23-06-2002 23:08
switching joystick axis????? team222badbrad Technical Discussion 9 16-01-2002 23:07


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

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