ROBOTC.net forums
http://www.robotc.net/forums/

Bluetooth solution for Multiple NXT robots?
http://www.robotc.net/forums/viewtopic.php?f=1&t=424
Page 1 of 1

Author:  deeps [ Sun Mar 02, 2008 11:20 am ]
Post subject:  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!

Author:  Ford Prefect [ Tue Mar 04, 2008 10:17 am ]
Post subject: 

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;

Author:  Dick Swan [ Tue Mar 04, 2008 5:40 pm ]
Post subject:  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.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/