Bugs And Workarounds

Here are some bugs in Enchanting v0.2 that you should be aware of. For more, see our bugtracker(external link). You may also want to read the Frequently Asked Questions.

Timing is not accurate

I'm not sure why, but the timer goes too slowly. This is most obvious when you use the 'play sound until done' block, which plays the sound, keeps waiting until the timer decides enough time has passed, and then moves on to the next block.

Lists don't transfer to the computer right

A program running on the robot is designed to be able to tell the computer when variables change. Unfortunately, the maximum size for a change is about 50 characters, and so a variable with a value longer than this — or a list, which almost always has a value longer than this! — doesn't update right when shown on the computer. The value on the robot is fine.

Broadcasts at the start of a program doesn't work

If you broadcast a message immediately after the program starts, it is not acted upon, as the code isn't to the point where it is waiting to hear the broadcast. Try putting a 'wait 1 second' block in front of your broadcast message.

Sometimes it doesn't connect right

The green flag lights up and becomes available in under ten seconds when you plug in an NXT that is turned on with a USB cable.

Sometimes this doesn't happen. I don't know really know why. To resolve it, quit Enchanting and restart it. If that doesn't work, restart your computer.

Pressing on 'configure sensors' brings up the 'configure motors' dialog

This seems to happen if the 'configure sensors' button is the first thing you press after running Enchanting. Go file -> new and try again, and it'll work.

Older Bugs

All of the bugs below have been fixed (or significantly reduced) in Enchanting 0.2.2.

The robot freezes and shows an error message

Most error messages mean that the code running on the robot 'did something wrong' and the robot didn't know what to do with it.

When this happens:
  • Press the enter (orange) and exit (dark grey) buttons to reset the NXT.
If that doesn't work:

  • Remove the batteries from the NXT to turn it off.
(Yeah, it is a real pain!)

These errors happen most frequently when you run a program on the NXT, remove the USB cable, try out the robot, and plug it back into the computer with the program still running. Resetting the NXT first, as above, helps.

You can only turn sprites in one direction

There are two turn commands under the motion palette. One makes the sprite on screen rotate clockwise (although the image itself doesn't rotate), and the other makes it rotate counterclockwise. Enchanting sees them both as being the same.

To rotate the other way, use a negative number.

Broadcasts don't always work right

Here are a couple of scenarios that don't work.

1. You broadcast a message right after 'When the start flag is clicked', and the message isn't received.

  • The code to receive the messages hasn't started running yet — the program just started! — and isn't ready to receive the message.
  • Try putting a 'wait 1 second' in front of the broadcast.
2. You broadcast lots of messages, which works fine for a while, and then stops working.

  • The robot keeps a list of messages that have been broadcast so it can tell your computer about them. (This is so you can broadcast messages from your robot to a program running in Scratch!) Unfortunately, if the robot isn't connected to a computer, it never empties out the list, and it becomes full, at which time, no further broadcast commands work.

I am asked to flash my firmware, but my NXT is already running leJOS 0.9.1

Enchanting makes sure to alert you if you aren't running the right firmware. If, for example, you are using LEGO's stock firmware, it'll ask you to install leJOS 0.9.1. Unfortunately, sometimes there is an error and Enchanting thinks you have the wrong firmware, when you don't.

If you know you have the right firmware, choose 'No' when it asks if you really want to erase your NXT and reformat it. The message will go away and you can continue your work.

(If you tell it 'No' and it turns out you have the wrong firmware, you'll get an error on the NXT, or your program will not run. In which case, flash the firmware at your next opportunity.)

Can't use 'and' with a 'not' (and other nested booleans)

You get an error: Message Not Understood: isBooleanReporter. I just saw this tonight. I don't believe you can work around it without using the blocks that cause the problems. Yuck. You may even have to forcibly quit Enchanting to get out of the error condition. Sorry.