10

I am attempting to control my NXT model via the Processing programming language rather than the provided language based on LabView. When I can establish a connection over Bluetooth, this works rather well, but establishing the connection itself is problematic. It appears to work only every dozen tries or so.

My question is, what are some good troubleshooting steps for this type of activity? I can see the NXT brick in my list of Bluetooth devices on my laptop (Win7 64-bit), and I can even see it in the list of devices when I run a test script in Processing. My laptop appears on the list of devices on my NXT brick, but the connection icon at the top of the NXT window only shows "<" rather than "<>".

I believe I am using the latest firmware version (1.31). The other settings listed are:

AVR & BC4 - 1.01

What else can I attempt to try? I am attempting to connect to other Bluetooth devices (iPhone, Wiimote) but have not found the necessary libraries to allow those connections yet.

2
  • Are you in close proximity to a wireless device (2.4 GHz)? Both bluetooth and wifi use the same frequency spectrum, so a conflict between the two may be a reason why you're having connectivity difficulties.
    – Nick2253
    Sep 19, 2012 at 22:47
  • Ha! I missed the `12. Thought you asked this today. ;-) Jun 23, 2015 at 17:59

1 Answer 1

2

You can use any programming language you like to remotely control the NXT provided that it can access a serial port of your computer. The Bluetooth connection on the NXT provides a virtual serial port. You can see this by opening "Devices and Printers" and double-clicking on the NXT (provided that you have already paired it). Then have a look at the "Services" tab in the window that opens.

screenshot

In the screenshot above, my NXT provides a serial port on COM4. Yours may be a different number.

So you need to do two things:

  1. Figure out how to open a COM port on Windows using the Processing programming language.
  2. Use the information in the NXT Bluetooth Developer Kit (available from the LEGO MINDSTORMS download page) to send commands to your NXT.

To use other Bluetooth devices with your NXT, you will need to relay the information though a computer to translate it into the commands from the NXT Bluetooth Developer Kit. In the case of the iPhone, you could write a custom program just as you would for a regular computer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.