/*RESCUE ROBOTICS WORKSHOP #1 I N T R O T O M O T O R S Ron Kessler Created 8/7/2018 //Updated 8/10/2018 On the NXT, the right motor (passenger side) is Motor B and the left one is Motor C. Make sure your motors are connected to the correct port on the ROBOT. This is the block of code where our program starts. All of you coding must be contained within the {} braces. Motors can run from 0% to 100% speed. Neg. speed makes it go backwards BE SURE TO SHOW STEP INTO FEATURE from the debug window. Run via USB. */ task main() { //STEP 1 motor[motorC] = 50; //move motor C forward at 50% speed motor[motorB] = 50; //ditto for B wait1Msec(3000); //wait 3 seconds. This lets motors run for 3 seconds //a millisecond = 1/1000 of a second //STEP 2 //---now lets stop them and go back for 3 seconds motor[motorC] = 0; //stop motor C motor[motorB] = 0; //ditto for B wait1Msec(3000); //wait 3 seconds. This lets motors stop for 3 seconds //STEP 3 //---no lets go backwards! motor[motorC] = -50; //go backwards at 50% Negative means backwards motor[motorB] = -50; wait1Msec(3000); }