View Single Post
  #2   Spotlight this post!  
Unread 26-06-2003, 00:53
Mike Soukup's Avatar
Mike Soukup Mike Soukup is offline
Software guy
FRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Schaumburg, IL
Posts: 797
Mike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond repute
You can either take the cable apart and trace the OI port pins back to the joystick pins, or you can put some debug statements in your code.

Each OI port has 4 analog inputs and 4 digital inputs, so you can run two joysticks off the same port and use the x & y axis and both buttons on both joysticks, or (if I recall correctly) you can do what your team did and only use one axis of each joystick.

Since you're new to pbasic (and I'm assuming you're new to the IFI control system) you should read the IFI documents. Start with the overview & Quick Start guides, then read the OI & RC Reference guides. The OI reference guide will give you the mapping between OI port and pbasic variable.

After you understand how the pins map to the pbasic variables, you can use them in code. Make sure you properly read in the analog inputs in your SERIN command. Now debug the p1_x, p1_y, p1_wheel, and p1_aux variables (if you're using a port other than 1, change the 1 to the correct number).

If you still have questions, post them and someone will help you out.