Sunday, March 11, 2012

Short Week on the Environment

Thursday, Friday, and Saturday of this week I was in Worcester for the FIRST Robotics Competition, WPI Regional. A big congratulations to FIRST Team 3182, Athena's Warriors, for placing 5th and making it to the first round of the finals. Excellent job team! Let's keep it up for Hartford at the end of the month! :)

Environment Work


Even though my focus shifted to FIRST at the end of the week, I was still able to begin preparations of my environment for programming the NXT. It was painfully obvious during my first LEGO project that the environment provided by LEGO was not robust enough to handle my needs. Despite being based off of LabView, the simplified interface did not provide enough utility to perform advanced functions.

Matlab and Simulink are going to be a big part of this project, so without a doubt this is the desired interface. Fortunately, Matlab 2012a includes libraries for the NXT and it's most popular accessories. Unfortunately, my computer has 2010a. It is possible to use RWTH, another NXT toolbox, with this older MATLAB version, but all my efforts haven't been able to configure this correctly. For now, when I try to run Comm_OpenNXT from the command window to begin communicating with the NXT, the function returns the following error. The NXT is attached appropriately and has been reset. Tracking this down online hasn't turned up anything useful either.

No NXT found on USB bus! Make sure the NXT is turned on and access rights in /dev/ are
properly set. Rebooting your NXT might help!

Rather than lose more time on RWTH, I decided to begin experimenting with BricxCC while I get a copy of the latest Matlab. BricxCC is an integrated development environment for working with NXTs as well as many other hobbyist controllers. In this environment, an NXT is programmed in a language called "Not Exactly C" (NXC), which borrows a lot from C, but has a much more narrow, restricted focus on NXT programming and includes a very substantial API. For example, NXC introduces a new keyword task which when managed correctly allows the programmer to easily create parallel threads.

So far I have been able to install the software and compile a basic program. Next week I will look into writing meaningful code and deploying it to the NXT.

Project Registration


I stopped into the Registrars Office this week to see Dottie. She helped me finish my project registration and gave me some other graduation materials as well. I am now registered for the project and will prepare my graduation materials soon.

No comments: