Print

About

Enchanting is a new programming environment for LEGO Mindstorms NXT. It was built to provide an easier way to do more with the NXT than any single alternative programming method for the NXT does. It is easy to use. Scratch is the most useful and fun programming environment I know of, used by children all over the world. Enchanting aims to build on that; for kids who have worked with Scratch, it is instantly familiar, and, for those who haven't, with some initial guidance, children start to imagine and create things with it in ways I haven't seen with the standard programming environment for the NXT, with more success and less frustration. Furthermore, Enchanting honours Scratch's rich multimedia heritage by letting you draw your own sprites and record your own sounds, easily.

Enchanting lets you work at a higher level than many other environments. You focus more on what you want to do instead of how it is done. Details that aren't important are abstracted away. You want to measure brightness with a colour sensor, for example, so you set it up once, name it, and thereafter refer to it by name — instead of constantly specifying which port it is attached to and what color the light is supposed to shine. You tell you robot how far to go in human units, such as centimeters or inches, or how much to rotate its whole frame around in degrees, instead of telling the motors to turn a certain number of degrees that you've tediously calculated that get this particular robot to where it needs to go. If someone wants to run the your program on a different robot, where the wheels are arranged differently, and they have a light sensor instead of a colour sensor, they change the configuration in one place, leaving the rest of the program unchanged, and the program works. And did I mention that the code is easy to read?

Due to help from Down Under, Enchanting also lets you go far and deep. If you want to apply mathematics, you can do so readily. If you'd like to massage data from your sensors into something meaningful, you can. You can readily create your own routines — or a teacher can create a custom block for younger students (like "close gripper" or "pick up object at coordinates x: ## y: ##"). When you are ready, you will find ways to open a treasure-chest of tools provided by computer science, such as lists, recursion, closures, object-oriented design and prototyped-based programming.

Enchanting is open source, free as in lunch and free as in speech. If you want to hack on it to provide a simplified programming environment for another sort of robot or device, go right ahead — we'd love to hear about it!

I wish I had Enchanting when I started teaching robotics. It has a low floor, wide walls, and a high ceiling. It is a great environment for anyone not interested in typing, compiling, and fixing syntax errors until they have something that works, and is a great springboard for anyone who moves further into programming. I highly recommend it.