This project has moved and is read-only. For the latest updates, please go here.

Multiple connections using the API

Apr 29, 2014 at 2:26 PM
Hello all,

a very helpful API. Is there a way to connect to more than one brick in an application? Both via USB and Bluetooth are possible.

It is possible to connect one brick with another brick via USB. In the Lego Mindstorms Software there is a way to control the motors and read the sensor values of the second brick. Somethink like this will be very nice.

Thanks to everyone.
Apr 29, 2014 at 5:05 PM
Right now we only support a single brick. It's something we may add in the future if time allows, or if anyone would like to take on the project themselves, I'd be happy to import the changes! :)
May 6, 2014 at 4:59 PM
Hello again,

it is possible to connect with up to seven Bluetooth devices with a Bluetooth dongle.
By defining the different bricks with their different COM ports it is possible to use more than one brick =)
May 6, 2014 at 5:03 PM
Neat! Is this on desktop, WinRT or Phone? Based on "COM port" I'm guessing desktop...

We wrote it for a single brick environment, and I know someone previously tried multiple bricks and the library failed pretty badly. Don't recall what platform he was on, though.

Regardless, thanks for the info!
May 6, 2014 at 5:12 PM
Edited May 6, 2014 at 5:19 PM
Yes it is on desktop.

static Brick _brick1, _brick2, brick3;
the bricks are defined
_brick1 = new Brick(new BluetoothCommunication("COM4"));
_brick2 = new Brick(new BluetoothCommunication("COM8"));
Sometimes there are two errors as shown as in the figure.