It's robot time once again. After creating Ms. ColorSortress I decided it was time to create a .Net driven bot. This little fellow, called SortAlgoBot, performs a classic Quicksort sorting algorithm on an array of twelve fresh colored Lego balls. It detects all colors in the first roundtrip. Then the actual sorting starts and all 'swaps' the algorithm makes are executed by the bot.
Build with a single Lego Mindstorms NXT 2.0 kit and some extra Lego Technic parts, like the Linear Actuator for some ball dropping. Programmed in C# with VisualStudio 2010 and the excellent Mindsqualls Lego Mindstroms Nxt library by Niels K. Handest. It fires of commands to Motorcontrol, a great third party NXC application for better controlling motor movements on the Lego Nxt brick. The robot is connected to the PC using USB. I didn't try it with the Bluetooth connection yet.
Source code on GitHub. See http://www.remondo.net/mindstorms-nxt-robot-performing-quicksort-algorithm/