View unanswered posts | View active topics It is currently Fri Nov 28, 2014 9:13 pm






Reply to topic  [ 2 posts ] 
Problem with Functions? 
Author Message
Rookie

Joined: Fri Jun 10, 2011 3:54 pm
Posts: 1
Post 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.


Fri Jun 10, 2011 3:56 pm
Profile
Rookie
User avatar

Joined: Mon Feb 14, 2011 10:37 am
Posts: 49
Location: The Pitts(burgh)
Post 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

_________________
Robot Virtual Worlds Technical Lead
Robotics Academy - CMU


Fri Jun 10, 2011 3:58 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.