Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Using Microsoft Robotics Studio to Program Parallax's Boe-Bot : Page 2

With the newly released Microsoft Robotics Studio and Parallax's Boe-Bot Robot Kit, which uses Bluetooth technology, robotic programming has become accessible to anyone with .NET programming skills.


advertisement
Controlling Boe-Bot Movement
After following the setup instructions in Parallax' BluetoothControlledRobot PDF, I recommend that you start with tutorial #4 available in the \Microsoft Robotics Studio (November 2006)\samples\RoboticsTutorials\Tutorial4 directory. This tutorial teaches you how to issue basic drive commands for your robot. Before using this code, you will need to ensure that your Bluetooth module is working properly and able to communicate with your computer.

You will also need to identify the COM port your Bluetooth module is using. When you install the Bluetooth USB adapter for your computer, it will likely install an icon in your System Tray and/or a shortcut on your desktop that represents "My Bluetooth Places." To find the COM port, double-click "My Bluetooth Places," and locate the item named "eb500 A7 serial port." Select that item and click "View or Modify Configuration" to locate the name of the COM port. After that, you will be ready to modify the RoboticsTutorial4 project by following these steps:

  1. If you have not already done so:
    1. Follow the setup instructions in Parallax' BluetoothControlledRobot-v1.1.PDF.
    2. Start the Microsoft Robotics Studio Command Prompt.
    3. Use it to open the file \Microsoft Robotics Studio (November 2006)\samples\RoboticsTutorials\Tutorial4\CSharp\RoboticsTutorial4.csproj. This will open the RoboticsTutorial4 C# project file in Visual Studio.

  2. Use Solution Explorer to find and open the RoboticsTutorial4.csproj Properties dialog.

  3. Select the Debug tab.

  4. Replace any contents in the "Command Line Arguments" field with the following string (note that it's a single line of code):

  5. <span class="pf">-p:50000 -t:50001 -- m:"Samples\Config\RoboticsTutorial4.manifest.xml" -- m:"samples\config\Parallax.BoeBot.manifest.xml</span>"

  6. The Dsshost.exe program uses this command line string to initialize the Decentralized System Services (DSS) runtime. This is the part of Robotics Studio that allows you to write and coordinate distributed processes.

  7. Expand the "Config" node in Solution Explorer and select the file named Parallax.BoeBot.Config.xml. Replace the value in the node named "SerialPort" with the value you identified for your Bluetooth port.

  8. Save your changes. From the File menu, click "Save All."

  9. From the Build menu, select "Build Solution." Ensure that the status bar reads that the build succeeded.

  10. Turn on the Boe-Bot power switch and make sure it is set to position 3.

  11. Press Ctrl-F5 to start without debugging. A command window appears to display messages (see Figure 2). Initialization takes a few seconds to run, after which the Boe-Bot should respond with two brief beeps. In addition, a small light on the eb500 Bluetooth module should come on.

  12.  
    Figure 2. Initialization Messages: This screenshot shows the command window output that appears when you execute the RoboticsTutorial4 project.
     
    Figure 3. Interface for the Robotics Tutorial #4: This tutorial shows how to drive the robot in any direction. You can use it with the Boe-Bot and other supported robots.
  13. After all the manifest files are loaded, you should see a form such as the one in Figure 3. At this point you should be able to control the Boe-Bot's movements using the arrow buttons. Each button moves the Boe-Bot in that direction. Once started, the movement continues until a new direction button is selected or you click the Stop button.


Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap