View unanswered posts | View active topics It is currently Mon Dec 22, 2014 2:51 pm






Reply to topic  [ 3 posts ] 
Bluetooth solution for Multiple NXT robots? 
Author Message
Rookie

Joined: Sun Mar 02, 2008 11:12 am
Posts: 1
Post Bluetooth solution for Multiple NXT robots?
Hi all,

I'm relatively new to the whole NXT world, but I am about to start using it for my final year university project.

The general idea of our project involves multiple NXT robots (up to about 3 robots) that will be doing their own tasks as well as a PC that provides some information to the robots. The robots themselves need to be able to "talk" to each other via Bluetooth (i.e., send AND receive with any of the other two). As well, they need to be able to talk to the PC.

From what I have read so far, it seems that an NXT brick can only connect with one other DEVICE at a time, be it a PC or NXT brick. Is this right to think?

Also, a brick, at any one time, can send AND receive simultaneously. However sends can be to multiple devices, while receives are limited to one device. Is this also correct?

Finally, the biggest problem I have is with the actual programming environment. While I am personally more adept with Java, I have come to the understanding that for involved projects, RobotC might be the better choice than NXJ, especially for Bluetooth communication. Is this a correct assumption to make?

Any and all advice would be greatly appreciated!


Sun Mar 02, 2008 11:20 am
Profile
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post 
Ich vermisse ebenfalls ein Bluetooth Netzwerk:
// missing - (how is this to be done?):

- 1 NXT als Server

- Konfiguration weiterer NXT als Clients

- eindeutige Vergabe von Bluetooth-Session-ID's bei der Client-Anmeldung (automatisch/dynamisch oder manuell/fixed)

- vom NXT-Server aus: Zugriff auf jeden Client-Sensor-Port;
- Konfiguration des Client-Sensors vom Server aus (analog, I/O, I²C, HTCompass etc.), e.g.
Code:
SensorType(int clientID, tSensors Port)=sensorSONAR


- auslesen eines jeden Sensorwerts an jedem einzelnen Client, e.g. :
Code:
y=SensorValue(int clientID, tSensors Port)

-vom NXT-Server aus: Steuerung eines jeden Motors eines jeden clients, e.g.:
Code:
nMotorEncoder[int clientID, int Port]=1000;
motor[int clientID, int Port]=70;

_________________
regards,
HaWe aka Ford
#define S sqrt(t+2*i*i)<2
#define F(a,b) for(a=0;a<b;++a)
float x,y,r,i,s,j,t,n;task main(){F(y,64){F(x,99){r=i=t=0;s=x/33-2;j=y/32-1;F(n,50&S){t=r*r-i*i;i=2*r*i+j;r=t+s;}if(S){PutPixel(x,y);}}}while(1)}


Tue Mar 04, 2008 10:17 am
Profile
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 615
Post Re: Bluetooth solution for Multiple NXT robots?
[quote="deeps"]The general idea of our project involves multiple NXT robots (up to about 3 robots) that will be doing their own tasks as well as a PC that provides some information to the robots. The robots themselves need to be able to "talk" to each other via Bluetooth (i.e., send AND receive with any of the other two). As well, they need to be able to talk to the PC.
quote]
You might want to look at one of the PC based programming solutions -- like Microsoft Robotics Studio (MSRS).

You really need to understand the Bluetooth performance limitations so that you don't end up with requirements that exceed the NXT capabilities.

The NXT can have three separate BT streams open on one master device. Slave devices can only have a single BT connection.

However, the NXT's BT chip only listens/transmits to one stream at a time. If one of the other two possible streams transmits to the BT chip then the data is simply dropped.

It takes 100+ milliseconds for the NXT's BT chip to switch from one stream to another.

It takes 70+ milliseconds for a master NXT to send a BT message to slave NXT and get a reply with the standard firmware. The ROBOTC firmware takes about 50 msec for equivalent task.

ROBOTC is optimized for single slave device which is why it was able to shrink 70 msec to 50 msec.

From your description, it appears you want PC to be BT slave with three separate BT connections to three different NXTs. The NXTs would all be slave devices.

MSRS might be able to handle the BT connection and messaging for you. I really don't know.

Otherwise, you could roll you own using the Fantom protocol and the Fantom.dll. Download the LEGO SDK for details. If you're programmed in Windows before, this will be complex but not impossible; and you should be able to find several open source implementations on the web that you might be able to adapt.


Tue Mar 04, 2008 5:40 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.