Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   FRC default code (http://www.chiefdelphi.com/forums/showthread.php?t=24191)

hedgehogger 21-01-2004 17:48

FRC default code
 
On the FRC default program is it programmed for one or two controllers to begin with???
-Hedgehogger

mtrawls 21-01-2004 18:38

Re: FRC default code
 
Quote:

Originally Posted by hedgehogger
On the FRC default program is it programmed for one or two controllers to begin with???
-Hedgehogger


Perhaps this little chunk of code from user_routines.c will answer your question:

Code:

/*---------- 1 Joystick Drive ----------------------------------------------
  *--------------------------------------------------------------------------
  *  This code mixes the Y and X axis on Port 1 to allow one joystick drive.
  *  Joystick forward  = Robot forward
  *  Joystick backward = Robot backward
  *  Joystick right    = Robot rotates right
  *  Joystick left    = Robot rotates left
  *  Connect the right drive motors to PWM13 and/or PWM14 on the RC.
  *  Connect the left  drive motors to PWM15 and/or PWM16 on the RC.
  */ 
  pwm13 = pwm14 = Limit_Mix(2000 + p1_y + p1_x - 127);
  pwm15 = pwm16 = Limit_Mix(2000 + p1_y - p1_x + 127);


jweric 21-01-2004 18:41

Re: FRC default code
 
It also is able to do so with 2 joysticks as well, if you would look at where the PWM declorations above it a bit, I forget the lne numbers. You would use PWM outputs 1 and 2


All times are GMT -5. The time now is 11:04.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi