Installation

  1. You must have Visual Studio 2008 with Service Pack 1 installed OR the latest version of Visual C# Express which is available for download for free here. Note: I am running Microsoft Visual Studio 2010 Premium.
  2. Download and install the Microsoft Robotics Developer Studio 2008 R3, available here.
  3. You need a Bluetooth module installed on your computer. My computer has one built into it. I believe you can purchase Bluetooth adapter from Lego if you do not have one.

After installing the Microsoft Robotics Developer Studio, we now have the Visual Programming Language 2008 studio available. This is the program that will allow us to “visually” drop and drag elements to create my code. We will use this program for our first project in which we will simply connect the Mindstorm NXT brick to the VPL Studio via Bluetooth.

Configuring Bluetooth

  1. We need to turn on our Mindstorm brick on and turn Bluetooth on.
    • This is done by clicking the orange button and using the right arrow button on the brick and selecting Bluetooth from the menu.
    • Turn the Bluetooth on by scrolling through the sub-menu and switching the Bluetooth on.
    • Scroll through the menu again, and press search. You should see your computer name show up on the brick display once it has successfully connected to your computer.
    • Now, select a number on the screen. The default password is 1234 which should be displayed on the screen already. If the first port is busy, try the next one.
    • Once a port is found, your computer will prompt you with this screen with a pop bubble to allow the Bluetooth device to connect. Click the bubble.
    • Then Bluetooth will prompt you for a password, again the password is 1234 by default.
    • Let computer install the drivers.
  2. Once you have received confirmation that the Bluetooth has successful connected, click on the Bluetooth manager from the task bar.
    • You should now see your NXT device.
    • Now we want to see what serial port the Bluetooth device is using. We will need this port number in a later step. To do this, click on the NXT brick from the Bluetooth Manager.
  3. We will now need to open the VPL Studio program so we can test our Bluetooth connection to the brick.
  4. Once you have the program open start by dragging the Lego NXT Brick from the “Services” menu on the lower left side onto the “Diagram”. (you gota scroll a bit to see the lego serivces) Every project starts with this step!
  5. Select the brick by clicking on it once. Then in the lower left hand corner, under the "Properties" window, click on the "Configuration" drop down and select "Set initial configuration". Expand the "Configuration" section by clicking on the + sign. You should now see this…
  6. Let’s enter in the configuration settings for the brick.
    • I entered SerialPort 9 because that was the serial port the Bluetooth assigned when we connected the brick. Use whatever port was assigned to your brick.
    • Set ConnectionType to Bluetooth
    • Set ShowInBrowser (this will give us some cool tools we can use later.)
  7. To test if you have successful configured your brick, compile the project.
    • Click Run -> Run Start on the menu bar.
    • Ignore the pop-up message that your service has no useful connections. Just click OK. We know we don’t have any useful connections, we just want to make sure we connected our Bluetooth correctly.
    • Your brick should beep at you and you should see a successful compile log.

      If you clicked ShowInBrowser during brick configuration, you will also get a browser window like this…