NXT Communication

The easiest way to communicate between NXT robots is the built-in bluetooth functionality. The NXT-G software allows you to connect up to 4 NXTs to each other and have them send messages back and forth. One NXT must be set up as the 'Master', and the other NXTs are set up as 'Slaves' to the Master. The Master can send data and receive data from all of the slaves, but the slaves can only send and receive data from the Master. Initially we set up the machine so that the 'Master' NXT received scoring data from 3 other NXTs that monitored touch sensors on the playing surface. Unfortunately we found that as the complexity of the programs grew, the reliability of the bluetooth communications dropped. Messages were either lost entirely or took a long time to be sent. Since we wanted to score to update quickly, this was not acceptable.

After some experimentation we decided that light communication was the way to go. Martijn Boogarts recommended this to us when we were exchanging emails about the machine, so he should get credit for the idea. The NXT light sensor can be used in a passive or active manor. When we take two light sensors from different robots and point them directly at one another (one stud apart), they can each monitor the other for signals. To send a signal from one NXT to another, we flash the light sensor a set number of times or for a certain length. The receiving NXT can interpret that signal and act on it. One additional tricky part in the communication is that the NXT cannot monitor and send signals at the same time. A state variable is used to make sure the two operations don't interfere with one another.

These are the light sensors between the Master Score NXT

and the Scoring NXTs