Instructions
Assembling the Robot
Lay out all of the LEGO pieces for the Mindstorms NXT robot. The instructions give you a visual on all the pieces and how to separate into white, blue, orange, black and silver pieces. Set the black tires, small pieces and black wires to the side.
Assemble the model according to the instructions, which start with the body of the robot, a large white piece. The instructions take you through building the tires, attaching treads, installing batteries and buttons. You also attach a green screen and controls on top of the robot's face. In all, there are 20 sections. The last part is attaching the electrical wires from the tires and base to the body of the robot.
Connect the motor by using one of the black 6-wire cables. Push in one end of the cable to the motor and the other to one of the NXT's A, B or C output ports.
Connect the sensor by using one of the other black 6-wire cables. Attach one end of the cable to the sensor and the other to one of the NXT's input ports, labeled 1, 2, 3 or 4.
Put six AA batteries into the NXT and press the orange button to turn on. Attach a USB cable from the top of NXT to the port on your computer.
Creating the Program
Exit all programs on your computer. Insert the Mindstorms CD-ROM into your computer's disc drive. The CD loads an installer. Follow the on-screen instructions until complete.
Open the Mindstorms NXT 2.0 software. Type in a name for your shooter program, then click "Go."
Click the top block on the "Common" palette which looks like gears. This block is called the "Moving Block." The block adds to the program sequence in the center. Click on the top right of the configuration panel at the bottom. A drop down palette appears. Click on "Unlimited," then on the hourglass icon or "Wait Block" on the "Common" palette. Select the second to last icon that appears to the right. This is the "Ultrasonic Sensor Block," which adds to the sequence.
Click on the configuration panel on the bottom right. In "Distance," set the amount of space you want between the robot and target before it starts to shoot, such as 10. Click on the "Move Block" in the "Common" palette again to add to the sequence. Click the bubble next to the "Stop" icon in the configuration panel on the bottom. Select the "Move Block" again to trigger the robot to move once it meets the target and trigger the ball.
Place a check in "B" and "C" under "Port" in the configuration panel on the bottom, which controls the shooting mechanism on NXT. Click the "Play" button on the right corner of the sequence screen to watch the program. Press the "Download" button to the left of the "Play" button to download to your NXT robot.