This is where you talk about the NXJ software itself, installation issues, and programming talk.
Moderators: roger, 99jonathan, imaqine
I am trying to exchange some data between two NXTs using bluetooth, however cannot understand the difference between the connection classes BTConnection and NXTConnection.
Is the difference related to its purpose, that is if you are going to connect an NXT to PC you should use a particlar class and for NXT to NXT you should use the other one?
- New User
- Posts: 7
- Joined: Sun Nov 25, 2012 12:14 am
NXTConnection is the base class for various connection classes used by leJOS (Bluetooth, USB, RS485). BTConnection is class derived from NXTConnection that implements connections via Bluetooth. In general you do not need to use BTConnection it is simply the implementation of the more general NXTConnection for Bluetooth. By using NXTConnection you will ensure your code is more general and easier to switch between the different connection types. To actually create the connection you need to use either the Bluetooth class and the more generic NXTCommConector class. To understand how these classes can be used take a look at the NXTConnectTest sample program.
- leJOS Team Member
- Posts: 3004
- Joined: Fri Sep 28, 2007 2:06 pm
- Location: UK
Return to NXJ Software
Who is online
Users browsing this forum: No registered users and 2 guests