View Single Post
  #3   Spotlight this post!  
Unread 15-02-2004, 08:58
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Modifying Default code

Basically what he said, just simplified. To map two joysticks, you would do something like this:

Code:
// This code assumes the joystick are on ports 1 and 2 and pwm01 and 02 are the drive motors.
// These can be easily changed
pwm01 = p1_y;
pwm02 = p2_y;
That code just makes the Y axis of the joysticks on ports 1 and 2 run the left and right drive motors.
__________________