View Single Post
  #3   Spotlight this post!  
Unread 26-01-2005, 09:46
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Using Custom Inputs on the Controller Board

Quote:
Originally Posted by schenkin
I want to use custon imports on the controller board...
How do I call on these inputs in the code. I figured I would us one of the joystick inputs and use my owm cable, but how do I tell the code where to pull the info from?
Use the OI documentation to find which pins to use on the joystick connectors. Then look at the ifi_aliases.h file in the default code to find the software names of each switch input. You can treat each switch input as a "magic variable" which is set for you automatically and reads out as either 0 (not active) or 1 (active).

(By the way, the default code with camera support already uses the trigger switch on joystick #2 to switch among colors to track.)