Controll 2 NXTs with a mobile phone via bluetooth

Post your NXJ projects, project ideas, etc here!

Moderators: 99jonathan, roger, imaqine

Controll 2 NXTs with a mobile phone via bluetooth

Postby theMope » Sun May 16, 2010 4:10 pm

I need some help with a Project:
The goal is to control 2NXTs via bluetooth, using my i900Omnia as master.
So far i made a little GUI for my omnia, using Canvas.
On my NXT i actually run the sample code BTReceive for the nxt.
I want my NXTs to execute different actions like move foreward, backward, etc.
My problem is that i dont know how to connect from my phone to the two NXTs and send them an integer.
There are only 10 types of people in the world: Those who understand binary, and those who don't.
theMope
New User
 
Posts: 1
Joined: Sun May 16, 2010 3:58 pm
Location: Germany

Re: Controll 2 NXTs with a mobile phone via bluetooth

Postby Shawn » Wed May 19, 2010 8:25 am

theMope wrote:
The goal is to control 2NXTs via bluetooth, using my i900Omnia as master.
So far i made a little GUI for my omnia, using Canvas.
On my NXT i actually run the sample code BTReceive for the nxt.


OK so your phone in midp2.

I've done midp2 stuff before but not with leJOS (so I don't know the exact setup).

Anyway it seems you know midp ok, so what you need is in SVN I think.

http://sourceforge.net/projects/lejos/develop

As far as I can guess, you'll just need to get the
Code: Select all
trunk/j2mecomms/
package into your midp project src.

There are samples to use in
Code: Select all
/trunk/j2mesamples/


which you can browse herehttp://lejos.svn.sourceforge.net/viewvc/lejos/trunk/j2mesamples

You can see how to send/recieve an int with http://lejos.svn.sourceforge.net/viewvc/lejos/trunk/j2mesamples/src/org/lejos/j2mesamples/Form1.java?view=markup

Feel free to post your code and/or a tutorial when you get it working.

Again, I am assuming it will work and have not used midp with leJOS myself.
User avatar
Shawn
Advanced Member
 
Posts: 723
Joined: Wed Sep 12, 2007 4:59 am
Location: Tokyo


Return to NXJ Projects

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests

more stuff