Go to Post Also, I'm tired of the "FIRST is a simulation of the real world"-- it isn't. If the real world was like FIRST, there wouldn't be any need for this organization. - cadandcookies [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 27-01-2005, 07:12
MarkVH's Avatar
MarkVH MarkVH is offline
Registered User
AKA: Mark VanHaitsma
FRC #0288 (RoboDawgs)
Team Role: College Student
 
Join Date: Dec 2004
Rookie Year: 2003
Location: Grandville
Posts: 30
MarkVH is on a distinguished road
problem with the default code

I ran into a problem with the default code from IFI. The drive pwm out puts are the same for each side when the joystick is moved only in the Y-axis where that should be the case for the X-axis.
  #2   Spotlight this post!  
Unread 27-01-2005, 08:51
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,113
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: problem with the default code

X axis is left and right. Y axis is front and back. When you move the joystick along the Y axis, you want the robot to move straight forward or backward. That requires controlling the motors on both sides identically.

The default code is doing what it is designed to do, and it is correct.
  #3   Spotlight this post!  
Unread 27-01-2005, 17:29
MarkVH's Avatar
MarkVH MarkVH is offline
Registered User
AKA: Mark VanHaitsma
FRC #0288 (RoboDawgs)
Team Role: College Student
 
Join Date: Dec 2004
Rookie Year: 2003
Location: Grandville
Posts: 30
MarkVH is on a distinguished road
Re: problem with the default code

yes that I realize. Right now I have one side wired backward so it will go straight. I know that is not FIRST legal.
  #4   Spotlight this post!  
Unread 27-01-2005, 17:55
CyberWolf_22's Avatar
CyberWolf_22 CyberWolf_22 is offline
Programming and Electrical Mentor
AKA: Allen Gregory
FRC #2587 (Afrobots)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Houston, Texas
Posts: 227
CyberWolf_22 is just really niceCyberWolf_22 is just really niceCyberWolf_22 is just really niceCyberWolf_22 is just really nice
Re: problem with the default code

What do you mean wired backward. If you mean the M+ to the black wire coming off the motor and the red to the M- this is completely legal we have done it in first many times before.
__________________
  #5   Spotlight this post!  
Unread 27-01-2005, 20:26
MarkVH's Avatar
MarkVH MarkVH is offline
Registered User
AKA: Mark VanHaitsma
FRC #0288 (RoboDawgs)
Team Role: College Student
 
Join Date: Dec 2004
Rookie Year: 2003
Location: Grandville
Posts: 30
MarkVH is on a distinguished road
Re: problem with the default code

Thanks thats a relief.
  #6   Spotlight this post!  
Unread 27-01-2005, 21:19
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,590
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: problem with the default code

Quote:
Originally Posted by MarkVH
yes that I realize. Right now I have one side wired backward so it will go straight. I know that is not FIRST legal.
Rule <R72> specifies the colors only for constant polarity circuits, which the output of the victor is not. When you are going forward there is 12v on the M+ and ground on the M-. When you are going backwards, there is ground on the M+ and 12v on the M-.
  #7   Spotlight this post!  
Unread 27-01-2005, 21:44
MichaelGoldfarb MichaelGoldfarb is offline
Registered User
AKA: Goldfarb
FRC #0312 (Heatwave)
Team Role: Programmer
 
Join Date: Aug 2004
Rookie Year: 2003
Location: St. Pete, FL
Posts: 11
MichaelGoldfarb is an unknown quantity at this point
Send a message via AIM to MichaelGoldfarb Send a message via MSN to MichaelGoldfarb
Re: problem with the default code

You can switch the X-axis in the default code by subtracting p1_x value from 255.

Example:
Code:
Limit_Mix(2000 + p1_y + (255 - p1_x) - 127);
__________________
I'm crazy!
  #8   Spotlight this post!  
Unread 28-01-2005, 00:04
ConKbot of Doom ConKbot of Doom is offline
Team Alumni
FRC #1184 (Cobra Robotics)
Team Role: Leadership
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Maryland
Posts: 153
ConKbot of Doom has a spectacular aura aboutConKbot of Doom has a spectacular aura aboutConKbot of Doom has a spectacular aura about
Re: problem with the default code

Quote:
Originally Posted by MichaelGoldfarb
You can switch the X-axis in the default code by subtracting p1_x value from 255.

Example:
Code:
Limit_Mix(2000 + p1_y + (255 - p1_x) - 127);
You would need to invert the whole thing if the robot is driving correctly and you have the motors "backwards" not just invert the x-axis.

But I say leave the wires "backwards" and let the processor have a few extra cycles for other things. Heck, the victors aren't labeled this year, so just put your own lables on them, and have the N+ and M- switched on those to prevent confusion.
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 running compiled code jskene Programming 10 23-01-2005 21:13
user code to default code phoenixomega001 Programming 5 09-01-2005 00:09
heres the code. y this not working omega Programming 16 31-03-2004 15:18
Strange IR sensor movement with default tracker code wun Programming 5 19-03-2004 10:51
default code and the actual robot tml240 Programming 15 24-01-2004 11:31


All times are GMT -5. The time now is 13:10.

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