Bluetooth issue

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

Bluetooth issue

Postby Nomos » Wed Mar 28, 2012 4:29 pm

I've made a program for the brick and one for the pc. When i run the pc program and the robot is on, i can control it, start a program or download files from it. But when the robot is starting his program nothing wont work. I can't take it over from the pc. I cant receive any logs.

Both programs are written in java.

PLease help
Nomos
New User
 
Posts: 2
Joined: Wed Mar 28, 2012 4:25 pm

Re: Bluetooth issue

Postby gloomyandy » Wed Mar 28, 2012 4:41 pm

Do you mean when you run your NXT program you are no longer able to talk to it from your PC program? If so then this is because when your program runs it is the only program running on the NXT, there is no other program waiting around to receive commands over Bluetooth. When the leJOS menu program is running it contains the code to do this and is running this code, but once your program starts the menu no longer runs. So if you want to be able to issue commands from the PC then you will need to include the code to handle Bluetooth within your program. If yopu want to use the standard Lego Command Protocol (LCP) to do this then you can use some of the standard leJOS classes, look at the leJOS documentation for classes that begin LCP.

However what does your NXT program do? It may not make sense to have both it and your PC program trying to control the NXT at the same time....

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

Re: Bluetooth issue

Postby Nomos » Wed Mar 28, 2012 7:00 pm

The robot has to drive in a arena. With several charging points. When the battery levels is to low it has to search the charging point. Further it has to avoid the other robots.
We have to obtain the battery level, a message or signal that it is still driving for the logging system and the ability to control the robot manually.

basically we want to send some data from pc to nxt and backward with both programs running.

Roy
Nomos
New User
 
Posts: 2
Joined: Wed Mar 28, 2012 4:25 pm


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 4 guests

more stuff