View Single Post
  #2   Spotlight this post!  
Unread 05-10-2003, 11:48
WakeZero WakeZero is offline
FIRST-a-holic Strategist
#1011 (CRUSH)
 
Join Date: Feb 2002
Location: Tucson, AZ
Posts: 316
WakeZero will become famous soon enough
Send a message via AIM to WakeZero Send a message via Yahoo to WakeZero
Of course.

A quick (and not too efficient way) to do it would be,

-------------------
if(switch == 1)
{
drive_onejoy();
}
else if(switch == 0)
{
drive_twojoy();
}
----------------------

switch would be the switch, drive_onejoy() would be a function for driving with one joystick, and drive_twojoy() would be a function for driving with two joysticks

Hardware wise, you could use the throttle on the first joystick as the switch. So past the halfway mark in one direction is one value for switch, and the past in the other direction would be the other value. Let me know if this helps any

The above code is in C format btw, not pbasic.
__________________
2004 Arizona Regional -- Semifinalist
2003 NAT Galileo Division -- Highest Seeded Rookie (20th)
2003 NAT Galileo Division -- 100% Autonomous Completion (7 for 7)
2003 Arizona Regional -- Rookie All-Star Award
2003 Arizona Regional -- Quarterfinalist

Alumni on Team 64, The Gila Monsters
College Mentor/Founder of Team 1011, CRUSH