I have provided two programs. Colossus1st is to be installed on Colossus' front NXT, and Colossus2nd is to be installed on Colossus' rear NXT.
The only sensors used in these programs are as follows:
Controlled by the front NXT are the front Touch Sensor and the Ultrasonic Sensor. Controlled by the rear NXT is the rear Touch Sensor. All the other sensors are not used in these programs, but are wired to the NXTs and are available for future use.
HOW THE PROGRAMS WORK:
As stated above, I have modified the "NXT Explorer" program from an unofficial Mindstorms NXT website as the Colossus1st program.
1.) Colossus moves forward unlimited until either of the front or rear Touch Sensors are pressed, or the Ultrasonic sensor senses an object 10 inches away.
2.) If any sensor is triggered, Colossus stops.
3.) If Colossus ran into something from the front, it will make an "Ooof" sound and back up a little.
4.) The Ultrasonic Sensor will then swivel right and then left, taking a distance reading in each direction.
5.) The distances are compared, and Colossus will turn in the direction with more space.
6.) If Colossus runs into something from the rear while reversing, the Colossus2nd program comes into play.
7.) Colossus will then make a "Buuuhh" sound and go forward a little.
8.) Colossus will return to step 4, then go to step 1.
In Colossus, the rear NXT is actually set up as the "Master," because this is the NXT I usually use as a remote controller. After downloading the programs and installing them on the proper NXT bricks, establish the Bluetooth connection from the rear NXT, and everything should work fine.
LEGO DIGITAL DESIGNER FILE:
There are four minor discrepancies in the LDD file. The first is that each of the four eight hole beams that form the bottom of the tread assembles don’t line up with the 4X4 Angular Beams. It seems as though in the real world, I am stressing those components a bit. Don’t worry though, as the beams aren’t out of alignment by much at all, and the tank chassis has served me well for a long time without any problems. I have provided a blue crossaxle/friction bush and a connecter peg at or around each of the four locations where the beams don’t line up in LDD. When you put the chassis together, these components connect the beams together. Also, even though LDD is generous enough to include the same exact Track Elements that I use, I have left the tracks off for simplicity. Just remember that you need 110 total track links, with 55 on each side to build my tank base. The sprockets are of the right type, and are in their proper locations in the LDD file.
The second issue is that the Ultrasonic Sensor swiveling motor assembly is off-center to the left. LDD didn’t let me put it in the exact center, where it is on the real-world Colossus. This doesn’t affect performance, but I was trying to keep Colossus as symmetrical as possible.
The third issue is that LDD wouldn’t let me connect a cable to the Sound and Light sensors due to the tight fit in the real robot. Just plug the Light Sensor into sensor port 3 on Colossus’ front NXT, and the Sound Sensor into sensor port 2 on Colossus’ front NXT.
The forth, simple issue is that LDD does not have sensors to represent HiTechnic sensors. Therefore, I have placed Light Sensors on the two rear sensor mountings to represent the HiTechnic Compass Sensor and HiTechnic Accelerometer. I have left these sensors unplugged. You can use any sensors you like and/or have on Colossus.