MARVIN has been coming along nicely. I have been working on him a lot in the last two weeks which is primarily the reason there hasn’t been many posts this week (not to mention the fact that all my resources have been pretty slow this week.
Last week I spent lots of time working on the radar system. I have the math figured out to get him to scan properly. The radar should be able to move back and forth as well as up and down to search using either the ultrasonic sensor or the legacy light sensor. I spent nearly the whole week frustrated because there was a bug in my code that I couldn’t find, but after much searching, I finally found it. About 5 seconds of editing the code and suddenly everything worked correctly. That’s a nice feeling.
This week I have been working on setting up the format for the code and the header files. I am taking a different approach this time. I have one program for each NXT, one specific header file for each program, and one universal header file that all six NXTs pull from. The universal header file contains common procedures to all the files such as display, music and communication. This is pretty handy because before each program had its own header file and there was little in common, so if I wanted to make a change to all four programs, I had to edit and debug four programs. That’s a real pain.
I have also worked out the bugs on the light communication. I am really beginning to appreciate communicating using the light sensors. I am finding that sending a message is slow because it takes about 480 ms to send a message, but it is very consistent and it I don’t have the minor timing variances that are common with Bluetooth. I don’t have to handshake the NXTs so as soon as the program is running, it is ready to send and receive messages which is really, really nice. Not to mention that I have six NXTs that are able to send and receive equally. Right now I have the programs designed to play a sound file after a certain amount of time and the synchronization is remarkable; it sounds like a single speaker, but in fact it is six speakers. I really fought with timing on the previous version.
The focus of my blog is Lego and Lego Mindstorms. You’ll see lots of stuff here that is not made by or out of Lego. That doesn't mean that it isn't related. That’s my way of trying to inspire my readers to think about creations that don't have instructions written by Lego. I have a belief that if you are not stretching your mind, your imagination and your abilities you’re not accomplishing much at all.