Machinedesign 2575 Blank 220 0 0

Software Review: How to Program MINDSTORMS Robots

July 10, 2008
The NXT-G software lets users build programs for Lego Mindstorms NXT robots and then transfers the code via USB or Bluetooth from the computer to the robot.

By Raquel Kozlowski and Corey Watt 

The program is based on LabView software from National Instruments Corp., which manufactures software and hardware that scientists and engineers use to create specialized instruments.

NXT-G was made to help stimulate the minds of younger generations, but it is also of interest to adults. In fact, the software probably would appeal to almost anyone. It is a useful learning experience for newcomers and yet is said to be functional enough for trained programmers. A user-friendly graphical-user interface, simple-to-use drag-and-drop features, and intuitive layout make the program easy to learn. NXT-G keeps users interested in programming because it relates to real-life projects.

Key to programming a robot is identifying your project’s objective and what you want the robot to do. The software is a graphical language (unlike, say, C++) so users drag-and-drop icons that provide various functions. These can be anything from moving the robot in a given direction to performing various sensor actions. Each icon includes settings users can change. Settings depend on the function, but for the most part are based on rotation, direction, and speed. Users can put together flowcharts of icons to create simple or complex actions. Tutorials show which icons to drag and drop.

For our first project, we built a robot with a sound sensor and then used the software’s step-by-step instructions to make the robot go faster as the noise got louder. The instructions were easy to follow, explaining where to put things and what each interaction does. It took us only about 3 minutes to complete the program and transfer it to the robot for testing.

After this, we tried programming without using a tutorial, a bit more of a challenge. We built a robot with a swing arm, an ultrasonic sensor, and a light sensor. Our goal was to make the robot travel to a red ball and then hit it with the swing arm. An ultrasonic sensor detected when the robot got close to the ball stand, a light sensor determined the ball was the right color, and the swing arm then hit the ball.

Coding this program took a lot of thought, but it was also more fun and provided more experience and interaction. A Robot Educator feature came in handy when we got in a bind. It shows how to build the robots and provides animations of what the robots do in response to program steps.

Despite all the pluses of the software, we did think of an improvement. The animations are convenient, but it would be neat to have a visual aid that simulated the program’s actions each time the user adds on more functions. Programming would then be less time consuming. It would also be less of a hassle than continually reloading and running data.

Everything from installing the software to writing this review has been a good learning experience. Lego Mindstorms is available online at

— Raquel Kozlowski and Corey Watt

Raquel and Corey were high-school seniors who just graduated this Spring. They built and programmed the robots as part of their physics class in the CNET Tech Prep Program at Lakeland Community College in Kirtland, Ohio.

A Lego Mindstorms NXT robot includes an Intelligent Brick (brain) with 32-bit microprocessor, servomotors, and sound, touch, light, and ultrasonic-visual sensors.

An animation in Robot Educator shows what the program will make the robot do.

The icon for the sound sensor in the software includes settings that users can change.

Sponsored Recommendations

A closer look at modern design considerations for food and beverage

April 9, 2024
With new and changing safety and hygiene regulations at top of mind, its easy to understand how other crucial aspects of machine design can get pushed aside. Our whitepaper explores...

Condition Monitoring for Energy and Utilities Assets

April 9, 2024
Condition monitoring is an essential element of asset management in the energy and utilities industry. The American oil and gas, water and wastewater, and electrical grid sectors...

Strategizing for sustainable success in material handling and packaging

April 9, 2024
Download our visual factory brochure to explore how, together, we can fully optimize your industrial operations for ongoing success in material handling and packaging. As your...

Fueling the Future of Commercial EV Charging Infrastructure

April 9, 2024
Miguel Gudino, an Associate Application Engineer at RS, addresses various EV charging challenges and opportunities, ranging from charging station design strategies to the advanced...

Voice your opinion!

To join the conversation, and become an exclusive member of Machine Design, create an account today!