Go to Post FIRST should never come before school and anyone who thinks otherwise is irresponsible and should not be mentoring the kids - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-01-2004, 17:48
hedgehogger hedgehogger is offline
Registered User
#1348
 
Join Date: Jan 2004
Location: John F.Kennedy Highschool
Posts: 31
hedgehogger can only hope to improve
FRC default code

On the FRC default program is it programmed for one or two controllers to begin with???
-Hedgehogger
  #2   Spotlight this post!  
Unread 21-01-2004, 18:38
mtrawls's Avatar
mtrawls mtrawls is offline
I am JVN! (John von Neumann)
#0122 (NASA Knights)
Team Role: Programmer
 
Join Date: Mar 2003
Location: Hampton, VA
Posts: 295
mtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to behold
Send a message via AIM to mtrawls
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);
  #3   Spotlight this post!  
Unread 21-01-2004, 18:41
jweric jweric is offline
Registered User
#1322
 
Join Date: Jan 2004
Location: Fenton, MI
Posts: 6
jweric is an unknown quantity at this point
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
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with FRC Default code AsimC Programming 2 11-01-2004 19:22
How long does it take you to load the default code? vegasmcse Robotics Education and Curriculum 10 03-11-2003 21:41
2003 PBasic default code from Innovation First ttedrow Programming 0 06-01-2003 11:18
default code archiver 2001 2 23-06-2002 22:53
Rookie Programmer has question about the default code DanL Programming 3 26-01-2002 19:59


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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