Go to Post FIRST isnt about getting what you deserve, FIRST is about other people seeing potential in us - and giving us an opportunity that we could never have earned on our own - KenWittlief [more]
Home
Go Back   Chief Delphi > Technical > Programming
Team 51   CD-Events   CD-Media   CD-Swap   CD-Spy   FRC-Spy   Unsung FIRST Heroes   WFA
portal register members calendar search Today's Posts Mark Forums Read FAQ rules
VEXpro
The Chief Delphi Forums are sponsored by Innovation First International, Inc.
Cross the Road Electronics
ADVERTISEMENT

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-27-2005, 06:12 AM
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 01-27-2005, 07:51 AM
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: 7,051
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
Send a message via AIM to Alan Anderson
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 01-27-2005, 04:29 PM
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 01-27-2005, 04:55 PM
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 01-27-2005, 07:26 PM
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 01-27-2005, 08:19 PM
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: 6,597
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 01-27-2005, 08:44 PM
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 01-27-2005, 11:04 PM
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 01-23-2005 08:13 PM
user code to default code phoenixomega001 Programming 5 01-08-2005 11:09 PM
heres the code. y this not working omega Programming 16 03-31-2004 02:18 PM
Strange IR sensor movement with default tracker code wun Programming 5 03-19-2004 09:51 AM
default code and the actual robot tml240 Programming 15 01-24-2004 10:31 AM


All times are GMT -5. The time now is 07:54 AM.

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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright © Delphi and Pontiac Central High School