Loginskip to content

Archive for August, 2007

Book Review - NXT-G Programming Guide by James Kelly

Wednesday, August 29th, 2007

I received a review copy of James Floyd Kelly’s book ‘LEGO MINDSTORMS NXT-G Programming Guide’ published by APRESS. James (Jim) does an excellent job explaining NXT-G to newbie programmers. To date, this is the best resource I would suggest for NXT owner (especially younger ones) who stare at the blocks palette in NXT-G wondering “where should I start?”. Jim gives a good introduction, explaining what a ‘program’ is all about, and teaches one after the other all the block in the NXT-G palette. Each block is described in its own chapter, which are written short to free time for experimenting with the newly acquired knowledge. The language is easy to understand, and Jim’s humor makes it even more enjoyable.
Still, in my opinion there’re some material which are lacking in this excellent book. Building each chapter to teach one block there’s not much ‘integration’ of the knowledge into more elaborate (and interesting) programs. After learning on Move block and Sensor block one is fully prepared to make Tribot travel on a line – a chapter explaining this program would be a great addition. I would have been happier if between ‘block-specific’ chapters there were more in-depth chapters combining blocks into programs which are more ‘fun’ and exciting – which is the main reason kids play NXT, right?
Another issue is the lack of references. There is a huge (over 3000) models published in NXTLOG, many contains simply NXT-G programs. I think any NXT book should refer it’s reader to official sites (such as NXTLOG) and community sites (such as NXTasy repository). It might have slipped my eyes – but I did not find any references in the book.
Last, although each chapter ends with some discussion on possible experiments one can done with the newly learned material, I find these instructions too obscure. I rather have a 2-3 listed items like ‘make SPOT do this and that’ then ‘it is possible to do this and that, and that too…’. I personally believe kids need more clear instructions what to do…

In conclusion – Jim’s book is a great resource for kids. In particular kids who got their NXT as a present, and have little or no adult support. Its weak points are less important for the novice, but would be more important after some experience is gained. Maybe Jim is planning on publishing ‘NXT-G Programming Guide - Part 2’ with more ‘advanced’ programming explained? Bottom line - strongly recommended.

Giant Wheel or Kinematic Sculpture?

Wednesday, August 29th, 2007



Our forums reader florijNXT was building this model in hope it moves like a giant wheel, which it doesn’t. Personally, I find it a nice example of ‘kinematic sculpture’ from NXT :)

If you think you can make this move more regularly - florijNXT would love to hear your ideas in his topic here.

Conveying NXT state with spoken text

Thursday, August 23rd, 2007

When building NXT models, I like to get feedback on the state of the program or the state of sensors to make sure they are working as intended. The matrix display on the front of the NXT brick is great for some types of output and has some neat features.  These include - showing up to 7 lines of text, drawing shapes and images, and doing simple animations. Some projects have used this to great effect. However, it has its limitations. The display is not very big, so you can’t read it from across the room.  You need to be directly in front of it, so it can’t be covered or facing away.  And finally it only shows black or white pixels.

Your other options for outputing state include; the motors (a precious resource), the red led on the light sensor (only good for binary output), and the speaker. Of these, the speaker is the best suited to fill the gaps where the display is lacking.  It it quite loud, can be heard in any direction and can quicky convey different types of information.

Since the NXT can play sound files, we can use the speaker to play short spoken phrases.  I use these to provide feedback in my models.  So – where do get the spoken phrases from? One option is to record your own voice. For me, I prefer to use one of the text-to-speech web sites that convert written text into wave files you can download. I quite like the voices at the AT&T Text-to-Speech Demo site. You just follow these simple steps –

  1. Choose a voice (mens/womans/regional etc.)
  2. Enter the phrase to speak.  Keep it down to a couple of words.
  3. Download it to your PC

The downloaded phrase is in a wave file that needs to be converted to an RSO file format which the NXT can play. There’s a nifty program written by John Hansen called wav2rso which does this conversion for you.  It can convert a number of files at a time. You can set the quality of the conversion which effects the size of the file produced (higher frequency = better quality = larger files)

Now upload the RSO file into your NXT. You can do this with either; the standard NXT programming environment using the Memory Tab on the connection window, or one of the file managers in either RobotC or the BricxCC development environment.

Finally, you add code to your program to play the file at the appropriate time (e.g. when changing program state, or detecting an object). In NXT-G you use the Sound block to play the file. In RobotC you use the PlaySoundFile function. In either case, you specify the name of the sound file to be played.
And that’s it! With a few simple steps your model is speaking!

Here are some examples of my projects that have speech in them - OneMotorNXT, NXTShot

What Would You Take on a NXTpedition?

Saturday, August 18th, 2007

NXT and Technic parts for a NXTpedition

I recently had to make that decision, moving to the Boston area with my family for a year or two. We only brought with us the two pieces of luggage that the airlines allow, so I could not possibly bring all the parts we have. But at the end, I really avoided making difficult decisions (like how many 24t gears to take). I just packed almost all my NXT and Technic pieces as tightly as possible and took them with me. When you pack tightly, the parts don’t take that much space. I left behind only the studded beams (except for a few), and all the non-Technic Lego parts.

NXT-Specific Parts at 50% Off at the Lego Store in Burlington

Saturday, August 18th, 2007

The Lego store in Burlington, MA (in the US) is selling all the NXT-specific parts at 50% off. This includes the brick itself, motors, sensors, cables, etc. I assume that other Lego stores in the US are holding the same sale.

An update: the store displays a sign saying all the parts are on sale, but Rick Rhodes wrote that the store actually only has sound sensors in stock.

Friday, August 17th, 2007


Ian Ahrris kindly pointed me to his website describing ready-made expension IO cards by Futurlec, which can be (rather easiliy) integrated into the NXT. These commercially available boards include a 7-segment display (image above) and an 8 LED output board.

Thanks Ian!

NXT Kinematic Sculpture

Thursday, August 16th, 2007



A lovely creation by Havard Fjaer. I hope he upload building instructions somewhere…

Sepp: a new bridge-laying robot

Monday, August 13th, 2007



Got contacted by “fraeggnxt” on YouTube, saying he’d built a brother-robot to Madison, my bridge-layer.
His creation, Sepp, is a fantastic bit of work. Much faster and more reliable than Madison ever was. I particularly like the use of twin light-sensors to line up straight against the gap-edge - wish I’d thought of that.

Lego NXT Dalek

Monday, August 13th, 2007



My 9 year-old son Danny is a major Dr Who fan, and challenged me recently to build him a Dalek.

This is probably the most fiddly construction I’ve put together yet. The NXT internals were actually pretty simple, but getting the “shell” right was a major pain. Turned out alright though.

Looks genuinely sinister when it starts moving, brings back all those Dr Who “behind the sofa” moments from my childhood!

(I’ve just thought, if you’re not from the UK you may not have seen Dr Who on tv and have no idea what a Dalek is. In that case, this post will make no sense at all, sorry!)

NXT Rubik’s cube solver - Final version

Saturday, August 11th, 2007



Daniele Benedettelli published this video, showing his NXT Rubik’s cube solver in action.

NXT I2C with PIC16F88

Friday, August 10th, 2007

Find some hints on the troublesome topic of “How to deal with I2C status -35″, which appears, if NXT doesn’t receive an ACK from the remote device. I2C lines are tristate ones. Probably, the device is hooked in high impedance state, as it should pull down the line to ground being an output line at that moment.

The PIC16F88 is programmed to detect the hooked state, then reconfigure the I2C pins to output with high level shortly, then with low level during 2ms and to finally reconfigure the I2C module.

NEWS: giving the sensor a power-up time of a few seconds and not following the NI toolkit user guide recommendation to write a few new bytes after status -35, but instead aborting the communication and re-enabling as indicated above, makes the communication completely stable with a very low number of lost packages: 120 (lost) / 123000 (sent) within 1 hour.

Read more… www.convict.lu/Jeunes/RoboticsIntro.htm

NXT Cavator

Thursday, August 9th, 2007


NXTLiftBoy sent me this wonderful video, showing his latest creation - NXT Cavator.

(more…)