Sub BTSerialReader_Connected (Success As Boolean)
If Success=True Then
BTAsyncStreamReader.Initialize(Me,"BluetoothAsyncStreamReader",BTSerialReader.InputStream,BTSerialReader.OutputStream)
Wait For MyNewText (Success As Boolean, Text As String)
'do whatever you need here
End Sub
Sub BluetoothAStreamReader_NewText (strBuffer As String)
CallSubDelayed3(Me, "MyNewText", True, strBuffer)
End Sub
Sub BluetoothAStreamReader_Error
CallSubDelayed3(Me, "MyNewText", False, "")
End Sub