PC GUI Controlling the brick

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

Moderators: 99jonathan, roger, imaqine

PC GUI Controlling the brick

Postby kewapo » Tue Jan 07, 2014 1:08 pm

I am starting with Lejos.
I've read the tutorial but I am very confused with this API.

I want to create a GUI that controls my NXT brick via bluetooth, so I have to use the PC API.
Have I must to open the bluetooth channel in my computer first?
Or maybe, Have I call the NXTInfo[] nxtInfo = nxtComm.search("NXT") to open the channel?

What is the best way to call the setSpeed, fordward, readValue, etc methods of the lejos.nxt of the PC API to control motors and sensors?


I am looking the answer reading the API docs and the samples, but maybe you can help me.



Thansks.
kewapo
New User
 
Posts: 2
Joined: Tue Jan 07, 2014 12:54 pm
Location: Spain

Re: PC GUI Controlling the brick

Postby kewapo » Wed Jan 08, 2014 12:51 pm

There is 2 posibilities.

The first one:

1. The PC-side code sends commands via OutputStream
2. The NXT-side code reads the commands via InputStream
3. The NXT-side code controls all motors and sensors in the usual NXT-way with the command received from the PC.

The second one:

1. The PC-side code controls directly the motors via the RemoteMotor.fordward() (and other methods of this class)
2. The PC-side code controls the sensors dicectly ( :?: IS THIS POSIBLE? :?: )
3. No NXT-side code is needed :?:

In the PC samples we can see an example of the first one.

Can anybody send me an example of the second way, a direct PC-side control of the motors and sensors of the brick?
kewapo
New User
 
Posts: 2
Joined: Tue Jan 07, 2014 12:54 pm
Location: Spain


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff