The UDP Light firmware that I sent you is using a very simple
communication protocol. As you describe below, the UDP broadcast mode
basically means that every robot configured in this way will receive a
message from any other robot. This is much like shouting. If you read
through the MatchPort b/g User Guide, then I think you might be able
to find another way to configure the MatchPorts to achieve a different
possibly more desirable communication protocol. The other way would be
for you to modify the PIC18F4520 firmware communication protocol,
which is listed below.
$X,Y where X = robot# and Y = 8-bit light reading
So right now each robot in the swarm reads all incoming messages and
based upon the above-listed command it will determine who sent the
message and then store the light reading in an array or readings. You
could easily modify this command to contain additional data or simply
create another command.
Regards, Abe