Lego
MINDSTORMS NXT:
The Lego
MINDSTORMS NXT Robotics kit uses motors, sensors, Lego Mindstorms
building parts and a small computer called the "NXT Brick" to create
Robots that one can program using the MINDSTORMS NXT software.
Like Scratch, MINDSTORMS NXT uses icons or
blocks that represent programming commands.
Definition of a Robot: A Robot is a
machine that can be programmed to do a task without being directly
controlled by a human being. There are two parts to a
robotic system.
1. Hardware: This is the mechanical robot. The motors, gears, wheels, parts, computers that make up the machine. This is the part you build.
2. Software: This is the
instructions for the tasks and actions the robot will do. This is
the part you write.
MINDSTORMS
NXT is used to create the software that controls the actions of the
robot hardware. NXT MINDSTORMS software is a visual/icon system
of assembling instructions. The flow of direction usually moves
from left to right. This software is an example of a compiled
program. Programs you write in NXT must be compiled and
downloaded to the NXT Brick before the Robot will perform the
program. (Scratch and Python are "Interpreted Languages.")
Example 1: Overview of MINDSTORMS NXT User
Interface

Example 2: Movement Blocks
Movement
Blocks direct motors A, B, or C to rotate clockwise or
counterclockwise. The motors have sensors inside them that can
measure how much they rotate. Motors C and B usually are used for
the drive wheels on a vehicle Robot. You may change the
following variables on a motor on the details window.

| Robot
Project 1: Drive in a Square Objectives: Select Movement Block parameters for motors selection, direction, distance, power, and turning. Use Swing turns to change direction. Use loop blocks to repeat commands. Project: Write an NXT-G program that will drive your robot in a square. Use rotations to measure distance. Use a loop block to keep the program short. Download and run your program to the robot. Process: 1. Open the Mindstorms NXT-G software. (Double click the orange square icon.) ![]() 2. Drag a Move block and connect it to the first part of the program ![]() 3. Change the parameters for the block: (Located on bottom of window) a. Motor check B and C b. Direction to Forward c. Power to 75 d. Duration to "4 Rotations." ![]() 4. Drag a a new Move block and set it next to the first block. ![]() 5. Change the parameters for this new block: a. Motor check to B only b. Direction to Forward c. Power to 75 d. Duration to "1 Rotations" ![]() 6. Drag a Loop Block and set it before the two movement blocks: ![]() 7. Put the Move Blocks inside the Loop. ![]() 8. Set the Loop count to 4. (Why do we set the Loop count to 4?) ![]() 9. Save your program as "LastnameSquare." 10. Carefully plug the USB cord into the top of the NXT-G Brick on the robot. 11. Plug the other end of the USB cord into the computer. 12. Turn on the Robot. (Press the Orange button once.) 13. Click the Lower Left Download Icon. (Looks like a pointing down arrow) ![]() 14. The robot will beep. After the beep and the downloading window closes, unplug the robot. 15. Take the robot to the table. 16. Select "Software" on the Robot. 17. Scroll until you see your program "LastnameSquare." 18. Put the robot on the table and press the Orange button to start and run your program. Press the Grey rectangle to stop the robot. 19. Make adjustments to your program as needed to make a square. |