View unanswered posts | View active topics It is currently Thu Apr 24, 2014 10:57 pm






Reply to topic  [ 1 post ] 
Curriculum Companion 
Author Message
Rookie

Joined: Thu Apr 17, 2014 4:54 pm
Posts: 1
Post Curriculum Companion
Hello! (First post - new licensee)

Reference YouTube video: https://www.youtube.com/watch?v=_pbVBnNMtMY
I am using the Curriculum Companion with the REMBot virtual robot. When I load the Basic Movement program Point Turns - NXT.c, compile and run, I am expecting the robot to turn right, wait and turn left. It does, but it does not end up back at the starting position. To save you time, this is a copy of the sample code (sans comments):

#pragma config(StandardModel, "RVW REMBOT")

task main()
{
wait1Msec(2000); // Robot waits for 2000 milliseconds before executing program

// Turn Right at full power for 0.75 seconds
motor[rightMotor] = -100; // Motor on motorB is run at full (-100) power reverse
motor[leftMotor] = 100; // Motor on motorC is run at full (100) power forward
wait1Msec(750); // Robot runs previous code for 750 milliseconds before moving on

motor[rightMotor] = 0; // Motor on motorB is turned off
motor[leftMotor] = 0; // Motor on motorC is turned off
wait1Msec(1000); // Robot stops for 1 second

// Turn Left at full power for 0.75 seconds
motor[rightMotor] = 100; // Motor on motorB is run at full (100) power forward
motor[leftMotor] = -100; // Motor on motorC is run at full (-100) power reverse
wait1Msec(750); // Robot runs previous code for 750 milliseconds before moving on
} // Program ends, and the robot stops
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Last edited by DrGame on Wed Apr 23, 2014 4:37 pm, edited 1 time in total.



Wed Apr 23, 2014 4:35 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 2 guests


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.