ROBOTC.net forums
http://www.robotc.net/forums/

Problem with Functions?
http://www.robotc.net/forums/viewtopic.php?f=55&t=3313
Page 1 of 1

Author:  andrewsams [ Fri Jun 10, 2011 3:56 pm ]
Post subject:  Problem with Functions?

I have the following code running against the virtual environment, H99:Astronaut Base to be exact:

Code:
void runForward (int numOfMillisec, int speedSetting) {
  motor[motorC] = speedSetting;
  motor[motorB] = speedSetting;
  wait1Msec(numOfMillisec);
}

void leftTurn (int numOfMillisec, int speedSetting) {
  motor[motorC] = speedSetting - 20;
  motor[motorB] = speedSetting;
  wait1Msec(numOfMillisec);
}

task main() {

  runForward(35000,50);

  leftTurn(14000,50);

}


For me, I never get the same behavior twice while running it in the sim. I just downloaded and began testing the latest version today.

Author:  Ed Paradis [ Fri Jun 10, 2011 3:58 pm ]
Post subject:  Re: Problem with Functions?

What does the number in the top left hand corner of the Virtual World window read as you run your program?

Does it stay steady or does it fluctuate in a range?

Ed

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/