Page 1 of 2

Sending BT Messages to the NXT (from a PC)

Posted: 16 Feb 2011, 02:14
by stryker001
First things first: I am not trolling.

That aside, I ask: Does anyone know of a good way to quickly send custom BT messages (that would store data or text) to the NXT from their computer?

An explanation: I am not asking if there are programs to communicate from the NXT to the computer and vice versa. I am asking if anyone has found any in particular that seem to work (preferably well, of course). I am wanting to (surprise, surprise) end up doing something like WiiMote-->Computer-->NXT as well as NXT-->Computer-->WiiMote. If there happens to be a magical application that does this for me, then sweet. But I've looked a bit and didn't find anything like that.

So does anyone know of a good way to do this? I don't want to do it the way this guy does it, with a bunch of crazy scripts and whatnots running at the same time. I would think that it could be done with two applications, one to handle Computer<-->NXT and one two handle Computer<-->WiiMote. Anyone out there know what I mean?


P.S. If it changes anything I'm using a WiiMote with the MotionPlus built in....

Re: Sending BT Messages to the NXT (from a PC)

Posted: 16 Feb 2011, 02:20
by stryker001
Oops, I forgot to mention: I'm using NXC.

Re: Sending BT Messages to the NXT (from a PC)

Posted: 16 Feb 2011, 21:59
by schodet
You can do this using NXT-Python.

Re: Sending BT Messages to the NXT (from a PC)

Posted: 16 Feb 2011, 22:49
by stryker001
Are you saying that it can be done or that it works well for you? Big difference.

Also, I don't speak Python, Just C-based stuff, but I'm willing to learn.

Thanks, though, I'll definitely look into this and keep looking for something else... I still need WiiMote stuff too. :D

Re: Sending BT Messages to the NXT (from a PC)

Posted: 16 Feb 2011, 23:39
by schodet
stryker001 wrote:Are you saying that it can be done or that it works well for you? Big difference.
Also, I don't speak Python, Just C-based stuff, but I'm willing to learn.
Thanks, though, I'll definitely look into this and keep looking for something else... I still need WiiMote stuff too. :D
I do this for USB, but it is supposed to work for BT the same way. NXT-Python will search for a brick using BT if it does not find a brick using USB. I documented USB messaging using NXT-Python here.

Also I know many people use python to access WiiMote (I can ask one of my friend if you like).

Re: Sending BT Messages to the NXT (from a PC)

Posted: 17 Feb 2011, 03:40
by stryker001
Sweet! that would be great.

Re: Sending BT Messages to the NXT (from a PC)

Posted: 18 Feb 2011, 23:17
by stryker001
DISCLAIMER: Call me a dummy, because I've never done anything with Python before.

But "this guy" (http://www.epokh.org/blog/?p=215) is using like four, maybe five different things to do all this. How hard would it be to put everything into one program, compile it, and then have a ".exe" that you run, it find your Wii Remote, connects, finds your NXT, connects, and then starts feeding data back and forth? I mean, is it really that hard to do something like that?

Like, for example, have the program do two groups of things simultaneously:
1) read the Wii Remote's buttonpress states, camera tracking values, accelerometer values, etc.; send them to the NXT.
2) read the values/commands the NXT is returning; send them to the Wii Remote.

With a setup like that you could use the speaker/LEDs/vibrators in the Wii Remote for audio/visual/haptic feedback (as well as the usual Wii Remote uses).

Am I just asking waaaaaaaaay to much and just need to figure out how to do it myself?

Re: Sending BT Messages to the NXT (from a PC)

Posted: 23 Feb 2011, 00:12
by schodet
It should not be hard to do it using a single python script. I do not know however for the .exe thing.

I will ask my friend about WiiMote when I see him tomorrow.

Re: Sending BT Messages to the NXT (from a PC)

Posted: 23 Feb 2011, 13:58
by novicesmml
Go over here http://www.norgesgade14.dk/bluetoothremote.php I dont know if this is what you are looking for but I did it and it worked fine
(it uses glovepie and NXT remote).
Hope you find it useful.

Re: Sending BT Messages to the NXT (from a PC)

Posted: 23 Feb 2011, 14:25
by stryker001
While that's pretty sweet, I'm looking for a way to send raw data, not commands. I.E., allow the NXT to process the commands, rather than the computer.