One of my old projects worked on back in early 2009  was a Linux blue-tooth control for Lego’s robots programmed using BlueZ socket programming and Qt with NXC robot language (“Not quite C” or “Not eXactly C”). We coded it for Linux since the default is a drag and drop module programming for Windows created by Lego themselves. If you have young children, I suggest giving them one of these robots as the Windows version is simple enough for a 6 year old to have fun.

A simple requirements document for the specs for the NXT Robot – ReqDoc.pdf

Home site of Lego’s Mindstorm NXT Robots – Lego Homesite

The goal of our robot was to have it able to play soccer with a swinging motorized arm on the side to hit around the ping pong ball. A record function was to be able to record the entire set of movements, and play them back exactly. It was to take into account the exact speed of the robots movements based on experimental data of different surfaces to match it as near as physically possible. The controls are done with Qt and dependent on the bluez Linux libraries.

To compile the program you may have to switch some of the package config paths in the makefile in the source root directory as different Linux distributions do things slightly differently with Qt. Prior to trying to run it, you will need to plug your robot in and transfer the robot code to the control brick.

An idea of what can be done further that we never got around to implementing is to include a Qt OpenGL section within the GUI. If your robot has a proximity sensory, you could draw the area around the robot with the proximity sensors.

If you decide to use this code, please let me know and comment on it. I don’t care if you use it, just don’t call it your own. I’ll admit it isn’t the prettiest code, but my ego requires me to say it is because of various contributors towards the project and not because of me. If you have any questions or want some of my other ideas, let me know.

 

Download Source Here

 

Related Posts: