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 1a: Drive in a Rectangle 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 rectangle. 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. Name your program "RectangleLastname" and Click "GO." 3. Drag a Motor Block to the Program Area. ![]() 4. Set the Motor Block Parameters to: a. Steering Straight Ahead b. Power = 50 c. Duration = 4 Rotations ![]() 5. Drag a 2nd Motor Block to the Program Area. ![]() 6. Set 2nd Motor Block Parameters to: a. Steering All the Way Left b. Power = 50 c. Duration = .55 Rotations ![]() 7. Drag a 3rd Motor Block to the Program Area ![]() 8. Set 3rd Motor Block Parameters to: a. Steering Straight Ahead b. Power = 50 c. Duration = 2.5 Rotations ![]() 9. Drag a 4th Motor Block to the Program Area ![]() 10. Set 4th Motor Block Parameters to: a. Steering all the Way Left b. Power = 50 c. Duration = .55 Rotations ![]() 11. Drag a Loop Block before the 4 Motor Blocks. ![]() 12. Put the 4 Motor Blocks inside the Loop Block ![]() 13. Set Loop Count to "2," ![]() 14. Plug Robot into USB port in computer. 15. Click the Download Button in the Lower Right Corner ![]() 16. After Robot beeps twice, unplug from computer and try on rectangle course. 17. Select "Software" on the Robot. 18. Scroll across until you see your program "RectangleLastname." 19. Put the robot on the table and press the Orange button to start and turn your program. Press the Grey Rectangle to stop the robot. 20. Make adjustments to your program as needed to make a square. |