As it sits, you can create your own debugstream as such:
bnsSerialSend(UART1, "Hello World!");
or if you want to attach data to that:
string sendingStr;
stringFormat(sendingStr, "Hello World %f", 3.14);
bnsSerialSend(UART1, (char*)&sendingStr);
Now what I think what you’re question is more asking is can you use “writeDebugStream” to print over bluetooth? Directly, I don’t think that’s possible as the debug stream uses UART0 and you can’t change it (factcheck?). However, what might be possible is that writeDebugStream could be overwritten using something like “#define writeDebugStream bnsDebugStream”.
Looking at this thread, it looks like it could be possible to do that.
The following might work? (I won’t have access to RobotC for the next several days so this is untested code)
#define writeDebugStream bnsDebugStream
void bnsDebugStream(String str, float option1 = (-1), float option2 = (-1), float option3 = (-1))
{
string sendingStr;
stringFormat(sendingStr, str, option1, option2, option3);
bnsSerialSend(UART1, (char*)&sendingStr);
}
I guess that’s assuming stringFormat can handle additional parameters even if str doesn’t contain them.
EDIT:
As for how many Bps bluetooth can handle, I normally set the baud rate to 57600, so that corresponds to around 5760 bytes per second (8 bits + 1 start + 1 stop). I have found on rare occasions faster then 57600 baud bits can be misinterpreted with the HC05 so I typically stick with that.