Bluetooth connection from NXT > NXT>PC !?

Post your NXJ projects, project ideas, etc here!

Moderators: 99jonathan, roger, imaqine

Bluetooth connection from NXT > NXT>PC !?

Postby Sonny1982 » Wed Jun 30, 2010 8:56 am

He Guys, I hope you can help me with my problem:
We build a NXT-Remote Car which is controlled by another NXT. Connection is mady by bluetooth. Now we have to send data from the motors (like speed, rotation counts) and sensord(lige the compass degrees) to the pc. This data schould be send in nearly realtime from the car to the pc.

Is it possible to do this? The problem is getting another bluetooth connection from the car to the PC while it is still connected with the Remote-Controll!?

We use leJos - Java for programming and the standard codes (BTSend and BTRecive) als modifed basecode to connect the car and the remote.

Thanks a lot
Sonny1982
New User
 
Posts: 3
Joined: Wed Jun 30, 2010 8:51 am

Postby gloomyandy » Wed Jun 30, 2010 1:18 pm

Hi,
The NXT supports one in bound connection and three outbound connections. So You should be able to have the car connect to the remote and then have the PC connect to the car (it is easier to do it this way, having the NXT connect to the PC can be rather tricky and the leJOS PC code does not offer help to do things). However you may run into problems with the speed of the connection when operating more than one at the same time. For various implementation reasons the I/O speed is much slower when multiple connections are in use at the same time on a single NXT...

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4119
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby Sonny1982 » Wed Jun 30, 2010 3:28 pm

Okay tank you, than this is no good idea because we couldn`t get in performance trouble because the car should react with the signals of the remote nearly realtime.
Is it possible to save all data on the nxt while the car is moving, then cut the connection and send the stored date by new connection to the pc? Is there any tutorial how to do it?
Sonny1982
New User
 
Posts: 3
Joined: Wed Jun 30, 2010 8:51 am

Postby gloomyandy » Wed Jun 30, 2010 8:35 pm

Hi, well rather than assume it will be too slow perhaps you should try it first...

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4119
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby sebalitter » Tue Dec 21, 2010 12:09 am

Hi Sonny1982, im learning about the bluetooth connection. this program may help me to understand, can you post both codes, the pc and NXT codes?

thanks :D
sebalitter
New User
 
Posts: 20
Joined: Mon Feb 02, 2009 10:32 pm
Location: Argentina

Re: Bluetooth connection from NXT > NXT>PC !?

Postby Aravind » Mon Jun 06, 2011 5:47 am

How about threading? Or direct all communications through the PC?
Aravind
New User
 
Posts: 17
Joined: Sat Jun 04, 2011 2:55 am


Return to NXJ Projects

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff