multiple NXT both way BT communication

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
d124124
Posts: 3
Joined: 13 Apr 2012, 07:53

multiple NXT both way BT communication

Post by d124124 »

I write this on behalf of my wife who doesn't have time to do it herself today. (I just build, my wife programs (in lejos))

We have 4 robots, red, blue, green and yellow. They wander around and when bumping into the wall they will turn. No problems so far.

Now if red sees blue then red should send a message to blue to turn around and face red. No problem programming red.
Blue should wander around also and is listening for a message from red. This should be possible but I think my wife had some problems with doing a task while waiting for a signal from red. But this should be solvable.

Now the the reverse should also be possible, red can be seen by blue and signaled to turn around. Now this complicates things, red has a main task (wandering around) while looking if blue is around and listening if blue has something to say. Can you run these 3 things paralel to each other?

And then the next step is putting green and yellow into the mix...

Somebody proposed to use a computer as message server but I (with little programing experience) don't see a lot of benefits in this.

Any smart ideas?
tabbycatrobots
Posts: 100
Joined: 27 Dec 2010, 19:10

Re: multiple NXT both way BT communication

Post by tabbycatrobots »

I'm building some dancing robots, and want the 4 of them to communicate, as they dance. I am still
working on this, but have developed a reliable BT protocol between the 4 NXTs. One is the lead dancer
and the other 3 periodically check for a message from the leader, so they all can get in sync. Although,
I have one leader / BT master and 3 BT secondaries, vs. 4 equals in your project, if I understand, there
may be some ideas in my sequence of BT messages that can help with your project. My BT test code
showing BT comms between 4 NXTs, is in the post <Pathfinding - BlueTooth - 4 NXTs - multiple queues>
under <Board index ‹ LEGO MINDSTORMS ‹ Mindstorms Software>. I haven't posted the actual dance
programs with BT, as my dancers are still "practicing".
d124124
Posts: 3
Joined: 13 Apr 2012, 07:53

Re: multiple NXT both way BT communication

Post by d124124 »

I had actually seen that post. I will point my wife to it. It's not the same idea but there probably will be some usefull ideas in it. thanx!
d124124
Posts: 3
Joined: 13 Apr 2012, 07:53

Re: multiple NXT both way BT communication

Post by d124124 »

I thought you might like the photo's I made yesterday. The robots will be in action at afolcon.

Image
Red and yellow together by d124124 aka dip, on Flickr

Image
Searching for his friend by d124124 aka dip, on Flickr
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: multiple NXT both way BT communication

Post by mightor »

They look great, nice use of both studded and studless bricks.

- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 2 guests