Make Your Lego Mindstorms NXT Talk!

nxtasy.org has an article about making your NXT speak. This prompted me to finish off a small program I had lying around.
Presenting: nxtsay. Simply pass the program a message you want your NXT to say and it will do so. Or alternatively you can give it a file to read out.
Here’s the synopsis:

Speaks the given text on a Lego Mindstorms NXT.
NXTSAY [/Q] [/T:timeout] [message]
NXTSAY [/Q] [/T:timeout] [/F] filename
If the message is not supplied it will be read from STDIN.
  /F          Read message from the given filename.
  /Q          Don't print any output.
  /T:timeout  Specify the time to spend searching for a NXT.
  /V:volume   Specify the volume of the speech (%).

You will need the Lego Mindstorms NXT software installed. The program should run ok on Windows XP and Vista – let me know if you have any problems!

Download nxtsay here

January Genealogy

I’ve recently started uploading my research on the origin of the surname ‘January’ in Britain. Take a look here

Large taskbar buttons for KDE

The standard taskbar buttons in KDE are quite small and hard to hit on a high resolution screen. This patch makes the KDE taskbar use big buttons with large icons instead.

Screenshot of big taskbar

bigtaskbar.patch

To apply the patch:

cd kdebase-3.5.5
patch < /path/to/bigtaskbar.patch

Then to rebuild just the taskbar shared object:

cd kdebase-3.5.5
./configure
cd kicker/taskbar
make
make install

After applying the patch edit ~/.kde/share/config/ktaskbarrc and under the [Appearance] section add IconSize=48

[Appearance]
IconSize=48

Then finally make sure the panel is big enough to accomodate the new taskbar. Open the Panel Menu and set the minimum size of the panel to about 70 pixels or more.

Possible conflict between pxhelp20.sys and a recent Windows update?

Yesterday I had a call from my father-in-law who said he was having a problem accessing the CD drive on his Windows computer. When he went into Device Manager he saw there was a warning icon over the CD drive and the Device status box in the device Properties said the following:
“A driver (service) for this device has been disabled. An alternate driver may be providing this functionality. (Code 32) Click Troubleshoot to start the troubleshooter for this device.”

I pointed him to a Microsoft Knowledge Base (Q314060) article that purports to solve the problem.
Today I booted up my home PC and noticed exactly the same problem. By disabling the CD-ROM drive filters one by one I eventually tracked it down to pxhelp20.sys – a driver used by Sonic Solutions’ CD burning software. It strikes me as more than a coincidence the same error occurred on both machines – I wonder if the driver conflicts with a recent Windows update or something like that?

A collision detection algorithm for moving rectangles

This algorithm determines if two moving rectangles have collided and the coordinates of the respective rectangles at the point of collision.

We want to know if two rectangles, A and B, have collided over a particular interval. A naive approach would simply check for the intersection of the two rectangles at the end of the interval (see fig. 1). Unfortunately this misses cases where the rectangles have passed entirely through each other and come out the other side (see fig. 2). Intersection is therefore not strong enough for collision detection. Checking for intersection will also not tell us the point of collision, only that the rectangles have collided.

(more…)