Here is the PDF LEGO-Mindstorms-NXT-2.0-Instructions.pdf

.MotorA.On .Wait 2 seconds .MotorA.Off .Wait 1 second .MotorA.On .Wait 2 seconds .MotorA.Off This program turns on the Servo Motor, waits for 2 seconds, turns it off, waits for 1 second, and then repeats the sequence.

Here is an example program that moves the robot arm:

Once you have built the robot arm, you can program it using the NXT software. The NXT software allows you to create programs using a visual programming language.