View Single Post
  #2   Spotlight this post!  
Unread 11-01-2007, 17:50
MattD's Avatar
MattD MattD is offline
Registered User
AKA: Matthew Douglas
FRC #0228 (GUS Robotics)
Team Role: Alumni
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Indianapolis, IN
Posts: 185
MattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to behold
Send a message via AIM to MattD
Re: Custom Joystick Setup in easyC

Yes, you can use OIToPWM() for direct drive or use GetOIAInput() with SetPWM() and make adjustments.

Code:
void OIToPWM(port, axis, pwm, direction)

port - the joystick's port on the OI
pwm - pwm output port number
axis - 1 = x, 2 = y, 3 = wheel, 4 = aux
direction - 0 = normal, 1 = invert

unsigned char GetOIAInput(port, axis)

port - the joystick's port on the OI
axis - 1 = x, 2 = y, 3 = wheel, 4 = aux

void SetPWM(pwm, value)

pwm - pwm output port number
value - the value to set it at
__________________
GUS Robotics Team 228

2010 WPI Engineering Inspiration Award
2010 WPI Regional Champions (Thanks 230 & 20!)
2010 CT VEX Champions
2010 CT VEX Innovate Award
2009 QCC VEX Champions
2009 CT Motorola Quality Award
2007 CT J&J Sportsmanship Award
2006 CT Best Website Award