Hi all,
Long time since I was here, but so far I didn't really have any problems, or could find my answers online.
The question I have now is quite a general one I'm afraid.
I want to let 4 robots (a blue, red, green and yellow one) wander around in a general space. Once a robot (say red) detects another robot (say blue) in front of it via the color sensor it should call blue and tell it to turn so that it faces red. In the mean time yellow and green keep wandering about and can also meet.
Now I need to figure out how to let the communication between the bots take place. All four of them should do their own thing (wander around and turn if they bump into a wall) until they meet, then the pair should connect and do something together.
The examples in the Lejos folder all have one master and one slave. The slave is only waiting for the master to call him. Is it actually possible to let the slave do things when the master is not calling him?
I suppose that we should start the entire thing by connecting all together (meaning 6 connections in total, maybe too much at the same time?). Then I could let one bot be the master, but if two slaves meet, how to make sure that they communicate: do it via the master? However the whole master slave communication is a hassle, it should be more intuitive if a robot just could say "hey, blue I see you turn around please" and that blue responds no matter who is calling him.
I find it quite hard to describe my question. I suppose the general question is: when using bluetooth do you really need one master and one slave, or could you do it in another way?


