Bluetooth RobotC to NXC
Posted: 29 Oct 2012, 23:44
I have just finished building a multi robot project that includes 2 NXTs programmed in NXC, and 1 NXT programmed in RobotC. Everything is working great with each independent program, but I need to be able to pass a couple of messages between the NXTs.
I tried setting the RobotC NXT as the master for BT connection with one of the other NXTs as slave (NXC with 1.31 EFW). The NXTs are paired up and have established a connection. The problem is that I have been unable to get any type of message to be sent from the slave to the master.
In the NXC program on the slave NXT I am using the BluetoothWrite function.
x = BluetoothWrite(0, data); // connection to port 0 which is the master
This functions returns the value 32, I have been unable to find what the return codes should be.
In the RobotC program I have tried many different things including:
cCmdMessageRead(nQueueID, nRcvBuffer, nSizeOfMessage);
Can anyone confirm that messaging should work between RobotC and NXC programs?
I can post some actual code snippets if it would help.
BManCan
I tried setting the RobotC NXT as the master for BT connection with one of the other NXTs as slave (NXC with 1.31 EFW). The NXTs are paired up and have established a connection. The problem is that I have been unable to get any type of message to be sent from the slave to the master.
In the NXC program on the slave NXT I am using the BluetoothWrite function.
x = BluetoothWrite(0, data); // connection to port 0 which is the master
This functions returns the value 32, I have been unable to find what the return codes should be.
In the RobotC program I have tried many different things including:
cCmdMessageRead(nQueueID, nRcvBuffer, nSizeOfMessage);
Can anyone confirm that messaging should work between RobotC and NXC programs?
I can post some actual code snippets if it would help.
BManCan