Sending BT Messages to the NXT (from a PC)

News, rumors, and other broad discussion topics.
stryker001
Posts: 125
Joined: 29 Sep 2010, 18:07
Contact:

Sending BT Messages to the NXT (from a PC)

Post 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....
stryker001
Posts: 125
Joined: 29 Sep 2010, 18:07
Contact:

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

Post by stryker001 »

Oops, I forgot to mention: I'm using NXC.
schodet
Posts: 139
Joined: 29 Sep 2010, 11:21
Contact:

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

Post by schodet »

You can do this using NXT-Python.
LEGO things http://ni.fr.eu.org/lego/ - NXT Improved Firmware (GCC) http://nxt-firmware.ni.fr.eu.org/ - Other robots http://apbteam.org
stryker001
Posts: 125
Joined: 29 Sep 2010, 18:07
Contact:

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

Post 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
schodet
Posts: 139
Joined: 29 Sep 2010, 11:21
Contact:

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

Post 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).
LEGO things http://ni.fr.eu.org/lego/ - NXT Improved Firmware (GCC) http://nxt-firmware.ni.fr.eu.org/ - Other robots http://apbteam.org
stryker001
Posts: 125
Joined: 29 Sep 2010, 18:07
Contact:

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

Post by stryker001 »

Sweet! that would be great.
stryker001
Posts: 125
Joined: 29 Sep 2010, 18:07
Contact:

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

Post 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?
schodet
Posts: 139
Joined: 29 Sep 2010, 11:21
Contact:

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

Post 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.
LEGO things http://ni.fr.eu.org/lego/ - NXT Improved Firmware (GCC) http://nxt-firmware.ni.fr.eu.org/ - Other robots http://apbteam.org
novicesmml
Posts: 39
Joined: 08 Dec 2010, 04:51

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

Post 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.
stryker001
Posts: 125
Joined: 29 Sep 2010, 18:07
Contact:

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

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests