Go to Post The amount of sense this rule makes is irrelevant. It is still the rule, and breaking this rule violates something that i'm sure all of you have heard of. Does gracious professionalism ring a bell? - Kate00 [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
  #1   Spotlight this post!  
Unread 14-03-2005, 19:19
NNSWIZ's Avatar
NNSWIZ NNSWIZ is offline
Registered User
#0839
 
Join Date: Jan 2005
Location: AGAWAM, MA
Posts: 1
NNSWIZ is an unknown quantity at this point
Question Program does not end

I have a problem with my autonomous code. It involves the use of a lot of while() loops that the compiler says will not end. I heard you might have to put an extra condition in the loop such as "If the motor is not on..."(In code). Here's my code:
while (rightteeth < 4 || leftteeth < 4)/*if robot has not turned four gear tooth counts... */
{
pwm13 = 0; /*rev left motor */
pwm15 = 255; /*forward right motor, hopefully will turn robot about ten deg's */
}
The variables rightteeth and leftteeth are to count inputs from the hall effect sensors.
Please someone help me!
 


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
2-week FIRST summer program @ WPI ColleenShaver General Forum 20 31-05-2009 03:02
Mulit-postioning with pnuematics this year? KenWittlief Pneumatics 101 01-02-2005 21:54
how to add steps in the provided encoder program for the edu Zaramel2002 Programming 3 11-02-2004 08:35
Fried program slots? Jeff Waegelin Programming 18 19-03-2003 18:08
Ahh! Program trick confusing! archiver 2001 9 24-06-2002 02:26


All times are GMT -5. The time now is 03:21.

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