NXT as a PC Slave

Post your NXJ projects, project ideas, etc here!

Moderators: 99jonathan, roger, imaqine

NXT as a PC Slave

Postby Teknoman117 » Sat May 08, 2010 12:53 am

First of all - I know there is a Java interface to the NXT. However I can't use java for the PC side for my project. I am trying to write a C++ program that communicates with the NXT. I use a robotics package on my Linux system called Player/Stage and it is C++. I am trying to create a NXT program(that part works) and a driver for Player/Stage (in C++) that uses the NXT as a slave robot. Does anyone know the protocol the NXT uses with NXJ? It doesn't seem to be the lego format.
New User
Posts: 1
Joined: Sat May 08, 2010 12:48 am

Postby gloomyandy » Sat May 08, 2010 7:45 am

I'mnot sure what you mean by the NXJ protocol. Do you mean the protocol used to download programs to the NXT? Or do you mean the protocol used for stream based connections? Also are you talking about USB or Bluetooth connections?

The protocol used to talk to the standard leJOS menu is a slightly enhanced version of the standard Lego protocol. The protocol used for a Bluetooth stream is the same as that used as the base protocol by Lego (a simple packet based system using a two byte header). Then above this the bytes/ints/longs etc. are simply serialized in Java. The best way to understand the various protocols is to look at the leJOS source code (which you have as part of your leJOS install)....

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

Return to NXJ Projects

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff