Half a Figure 8...
So far we have used the instructions to go in the direction of the yellow arrow, and turn into the direction of the green arrow. We could repeat these three commands for the red arrow, three more for the blue arrow, followed by three more for the white arrow - 12 commands in all - but there is an easier way!
A "repeat" (or "loop") command allows us to repeat commands.
Select the loop command and move it to the position shown above.
Next move the three commands inside the loop.
Next click on the loop, at the point indicated by the blue arrow above, and adjust the command panel (see below) to 4 repeats.
Now download your program into your NXT Robot, and run it - the result could look like this (broadband click here), (dialup click here).
To find out what to do next, click here.
Lucky or Unlucky? - Tutorial 18 - NXT-G - LEGO MindStorms NXT - www.DrGraeme.net