Bluetooth Stream

This is where you talk about the NXJ hardware related topics such as the brick, sensors, LEGO pieces, etc.

Moderators: roger, imaqine, 99jonathan

DeQiu
New User
Posts: 14
Joined: Wed Jan 09, 2008 9:55 pm

Bluetooth Stream

Postby DeQiu » Wed Jan 09, 2008 10:06 pm

I have a question:
It is possible to use inputStream and outputStream simultaneously ?
For example one thread uses InputStream and another thread uses outputStream regardless.

User avatar
kirkpthompson
leJOS Team Member
Posts: 305
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA

Postby kirkpthompson » Thu Jan 10, 2008 4:58 am

Philosophically what does "simultaneously" mean anyway? If i understand correctly, there is some latency for the BC4 chip to switch between send and receive modes so I guess the answer is...

..depends on how you define "simultaneously".

I am working on some classes that abstract BT communication between the NXT and computer (and other NXTs). Check out the URL i provide in this post: http://lejos.sourceforge.net/forum/viewtopic.php?p=2187&highlight=#2187

User avatar
bbagnall
Site Admin
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

Re: Bluetooth Stream

Postby bbagnall » Fri Feb 01, 2008 6:32 pm

DeQiu wrote:I have a question:
It is possible to use inputStream and outputStream simultaneously ?
For example one thread uses InputStream and another thread uses outputStream regardless.

Yes, you can use them simultaneously. i.e. Grab an output and an input stream and use them as you like.


Return to “NXJ Hardware”

Who is online

Users browsing this forum: No registered users and 0 guests