Challenging Topics

Non-Bluetooth BattleBot Tournament

Mazebot

Example Projects

NXT-G Problems and Solutions


General trouble shooting steps

  1. Are your cables connected correctly?  Right port/motor/sensor?
  2. Are you running the right program?  Redownload it and try again...
  3. Are your sensor thresholds correctly set?  They may need to change from day-to-day...
  4. Is the sensor itself bad?  Try one from another kit...
  5. Is the cable bad?  Try another one...
  6. Try another robot with your program.
  7. Pop a flare and ask for help.  :)

[top]


Help!  I can't find the broken wire!

Problem

Data wires are great until you try to compile your program and are told there is a broken wire.  Sometimes they are just impossible to find.  What to do, what to do???

Solution

We've installed a tool named Remove Bad Wires in the Tools menu.  Run it and it will find and delete all broken data wires!

[top]


I'm out of room in my NXT!  I can't download my program...

Problem

The NXT has a very limited amount of memory for storing programs, sounds and graphics.  Before you start deleting your programs, try this:

Solution

  • First check for unused sounds or image files...and yes, do look for any unused programs.
  • Check the Show System Files check box in the Memory tab of the NXT data window: system view
    • These files support options such as on-brick programming and the Try-Me programs.
    • Deleting them won't cause us any problems...they can be restored with a firmware update.
    • You can free up 120KB by deleting these!
  • Be very careful with sound files...they take up lots of space.
  • Use My Blocks - they are shared across all programs!

[top]


But the blocks I'm using take lots of memory...

Problem

Some blocks are very powerful and support a very wide range of options.  The Move block is a good example.  These blocks take a lot of memory and can be slow to run in some circumstances. 

Solution

LEGO and NI (the folks who make the NXT-G programming language) have put together a groups of Mini Blocks that are streamlined...less memory and faster!  We have downloaded these.  If you can't find them in any palatte, open the Block Import and Export Wizard (found in the Tools menu) and browse for the folder containing the new blocks.

[top]


How do I keep my Loop or Switch structure from shrinking down?  I can add anything to it!

Problem

The Loop and Switch structures tend to shrink down to the smallest size possible.  This can make it difficult if not impossible to add a parallel sequence inside them.   How can we make the structure "open up" wide enough to work in it?

Solution

Several blocks have data hubs that extend from the bottom of the block.  The Display and Switch blocks (that's Switch block not structure) are excellent candidates.  Just drop one of these in the main code sequence, extend the data hub and you're in business.  When you are done, you can "pin" the structure open by putting a comment block where you'd like it to stop.  The comment will keep it open that wide.

[top]


My variables are changing when they shouldn't be!

Problem

Sometimes it seems that my variable is being changed but nothing I've done should be changing it!

In NXT-G variables are "global".  Great, what's that mean???  It means that there can only be one variable with a given name in your program.  So what?  That even means in a My Block!  Suppose you have a variable in your program named i you use to keep count of the number of times your robot has gone through a loop.  If you have a My Block that also uses a variable named i, it is the same variable!  If your My Block changes it, it just changed it for the whole program!

Solution

First, be very careful giving names to your variables.  If you want to use a variable for a My Block then use the name of the My Block in the name of the variable.  For instance, if the My Block is named Turn90 and you want to use a variable named i there, then name the variable Turn90_i.

[top]