Go to Post It always surprises me how many teams wait until their robot is being inspected to learn how files should be used. - Richard Wallace [more]
Home
Go Back   Chief Delphi > Technical > Control System
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
  #8   Spotlight this post!  
Unread 18-01-2007, 11:07
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: 1 joystick or 2?

I would say setup your OI for two, but have a switch to change between 1, 2, or xbox.

you could use code like this. You would need to wire a toggle switch to Port3 Top and Port3 Trig, but thats simple.
Code:
if (p3_sw_trig)//one joy
{
  pwm01 = Limit_Mix(2000 + p1_y - p1_x + 255);
  pwm02 = Limit_Mix(2000 + p1_y + p1_x - 255);
}
else if (p3_sw_top)//xbox
{
  //xbox control code here.
}
else //two stick
{
  pwm01 = p1_y;
  pwm02 = p2_y;
}
If you have any questions PM or e-mail me.
__________________
Eric Haskins KC9JVH

Last edited by EHaskins : 18-01-2007 at 11:08. Reason: Code error.
 


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
joystick ? _GP_ General Forum 1 26-02-2004 23:10
Joystick rmmlg Inventor 0 15-02-2004 16:34
Joystick cammie825 Technical Discussion 1 15-01-2003 10:48
No Joystick archiver 2001 2 24-06-2002 01:14
Joystick Absolute Value Technical Discussion 21 22-02-2002 10:56


All times are GMT -5. The time now is 05:35.

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