Computer science project - Remote controlled NXT robot

Post your NXJ projects, project ideas, etc here!

Moderators: imaqine, 99jonathan, roger

New User
Posts: 4
Joined: Wed Oct 17, 2007 10:34 am

Computer science project - Remote controlled NXT robot

Postby elpy » Wed Oct 24, 2007 11:27 am

Hi there. My team has decided to make a NXT robot that we can control From a PC using bluetooth.

I'm having trouble sending information from my PC to my NXT. If I can do that, I'm sure we'll be able to program some UI for the PC, and get the motors and sensors to work on the NXT side.

So.. If anyone could paste some code doing the following:

PC side:
Open BT connection.
Send and int value (or byte or whatever?)

NXT side:
Recieve int and print it on screen

Please include the import lines that I would need, as I'm often having library problems :/

Just so I don't get a standard answer; I have read the sample codes and the pctools, but I can't figure out how to use them (too complex codes, or non working codes :/). And my classpaths are correct.

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

Postby bbagnall » Sat Oct 27, 2007 6:08 pm

You should just use iCommand. It does everything you want. There are some samples when you download it.

New User
Posts: 1
Joined: Tue Feb 19, 2008 6:12 pm

Postby r0b0t1c » Tue Feb 19, 2008 6:24 pm

I'm a bit confused, what's the difference between iCommand and leJos ?
I thought LeJos was an enhanced version of iCommand, you can control your nxt trough bluetooth with leJos can't you ?
Many thanks

User avatar
Active User
Posts: 81
Joined: Tue Oct 16, 2007 7:28 pm
Location: Prague

Postby PatrickLismore » Thu Feb 21, 2008 9:03 pm

ICOMMAND runs on your PC.

If you write your programs for your pc using icommand in it you can directly access the NXT Brick and control it as well as get information back from the bricks sensors.

When you write a program with the lejos classes they will only execute on the NXT Brick.

There is tons of information about this online,

If you look in side the incommand folder you will find a folder called "samples" there are several classes that you will find helpful, fun and very useful for what you want.

There is one specific class in the samples folder called "" it allows you to use the arrow keys on your keyboard to control the NXT via bluetooth.

What i done was i modified this class to include a LightSensor object so that i could also extract data from my light sensors.

If you want to control the nxt from the pc and get data from just write a program that executes on your pc include the relevant icommand stuff.

definitly have a look at the samples folder there is lots of useful stuff in those classes.

Return to “NXJ Projects”

Who is online

Users browsing this forum: No registered users and 0 guests