Texas Tech University

Programming Guide


Most Frequent Programming Mistakes

It can be hard for a teacher who hasn't used the NXT program for very long to determine what has gone wrong with a robot when a student asks "Teacher, why won't it work?" These glitches are among the most common mistakes. However, robots and computers have a funny way of coming up with new problems faster than we humans can address them.

Is the Robot Not Doing All the Steps It Is Told to Do?

If the robot is moving, but not doing all the steps you programmed it to do, it is usually because the steps are not being loaded into the NXT. This happens when the blocks are not connected to the LEGO beam.

GEAR Programming Guide

It is easy to accidentally cause your programming blocks to become disconnected from the beam. When this happens, the blocks become greyed out, and will not be performed by the robot when the program is loaded.

GEAR Programming Guide

Even when the beam looks connected (like above), sometimes the pieces are still not attached. Keep an eye out for this error. If a student doesn't catch it, the robot will not carry out the steps — which can be absolutely maddening.

Is the Robot Not Moving at All?

Often the robot will run a program and keep running, but it will not move. Or it will just make a small jerking motion and then stand still. This happens when the robot's motors are not attached.

GEAR Programming Guide
GEAR Programming Guide

This can be the difference between a motor being connected and disconnected. It is always best to push the cords in to their sockets some before running the robot. Also, remind your students not to pick the robot up by the cords because this causes them to slide out most of the time.

Error Message: Cannot Find a NXT Device

GEAR Programming Guide

This common little error is usually an easy fix. This error means that the NXT brick is somehow not connected to the computer. Often the USB cord is loose or the robot is not turned on. Check your connections and make sure the NXT is powered on. If the error persists, then the problem is with your computer. For example, it may not have the right driver for the NXT brick to connect with it. If you can, try to test the robot with another computer or try resetting the computer.

Error Message: The NXT Device Is Out of Memory

GEAR Programming Guide

This is another easily fixed error. Often NXT bricks will be used by one class or one group then passed on to the next with the first group's programs still on it. These programs take up space in the NXT's memory and will cause this error if there are too many programs loaded.

GEAR Programming Guide

Hit the "NXT Window" button, located above the download button. This will open the NXT window.

GEAR Building Guide

In this window, you can rename your NXT brick, check the battery life, or see how much space the NXT has left in storage.

GEAR Programming Guide

Hit the memory tab and this screen will appear. This NXT's memory is so full that the next program isn't able to be loaded. When this happens, you can either delete the entire memory with "Delete All" or slide up and down through the list of programs and pick out which ones are not needed anymore. If your student's NXT is full of programs they are still using, then encourage them to make their programs with fewer blocks, if possible. That is the only way to make a program smaller in size.

Error Message: The NXT Firmware Is Not Up to Date

When an NXT brick is new or reset, sometimes it may not have the proper firmware loaded inside it. Luckily, this is an easier fix than it sounds.

GEAR Programming Guide

At the top menu under "Tools" there is an option to "Update NXT Firmware..." Click this to open the firmware menu.

GEAR Programming Guide

The firmware menu shows what version of firmware your NXT has. If it is out of date, all you need to do is hit the "Download" button and the process begins immediately. It only takes a couple of minutes, and only needs to be done once.

Error Message: Device Driver is Busy

This cryptic error usually occurs on PCs running Windows Vista. When this happens, there is an easy way to take care of it. You just need to end the NXT process and restart the program. Just exiting the program is not enough, however. You need to open the task manager and end the process there. NOTE: Be sure to save your program first!

GEAR Programming Guide

Hit CTRL+ALT+DELETE to open up your task manager. Click on the processes tab, find MINDSTORMSNXT, and click "End Process". This will close the NXT program, so you will need to open it up again and load the program you were working on.

If you get an error or encounter a problem that you are not familiar with, just keep your wits about you. If your computing knowledge isn't enough to fix the problem, type your error or issue into your search engine of choice. There are many online forums and communities where people with similar problems post about them to get a solution from other users. Happy programming!