Go to Post I believe you have the right to develope your own opinion. I would suggest it be based on actual experience and facts. - Mike Copioli [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 09-03-2007, 05:17
BorisTheBlade's Avatar
BorisTheBlade BorisTheBlade is offline
lead programmer 2004
AKA: Dane
FRC #1351 (TKO)
Team Role: Mentor
 
Join Date: Oct 2005
Rookie Year: 2004
Location: San Jose, Ca
Posts: 23
BorisTheBlade has a spectacular aura aboutBorisTheBlade has a spectacular aura aboutBorisTheBlade has a spectacular aura about
Send a message via AIM to BorisTheBlade
Re: autonomous timing

I'm not sure what value you have autocounter2 initialized as but according to your code the second while loop will never occur.
at the end of your fist loop assuming autocounter2 is initialized to 0 autocounter2 will equal 11 and since 11 is not equal to 2 it skips the second loop.

I'm also assuming from looking at your motor speed values that you are turning a little then driving full speed forward. if thats the case then here is my suggestion.

take out the if statement then when the first loop finishes and autocounter2 equals 11 the second loop will start and go till autocounter2 = 51
it would look like this:
Code:
while(autocounter2<=10)
{
pwm01=200;
pwm02=254;
autocounter2++; 
}
while(autocounter<=50)
{
pwm01=254;
pwm02=254;
autocounter2++;
}
by the way use autocounter2++; instead of autocounter2=autocounter2++;
__________________
Team 1351 TKO Robotics (click for our website)
2007 sacramento regional Johnson & Johnson Sportsmanship Award winners
2007 CAL Games Finalists

Last edited by BorisTheBlade : 09-03-2007 at 05:21.
 


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
Timing Belt Clamp shorton Technical Discussion 10 18-07-2006 22:50
Distance timing out bludstayne Programming 5 05-03-2004 13:47
question about autonomous timing zainali Programming 6 23-02-2004 22:58
Timing Codes Ryan Cumings Programming 11 29-01-2004 22:26
Solution to Timing Loops Steven Carmain Programming 39 10-02-2003 13:33


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

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