Let's Make Robots!

Microsoft Robotics Studio on Parallax BS2px via RF ~ Is it possible?

I'm tyring to hook up the control of my robot, which is using BS2, with MSRS. Can it be done? Where should I start?

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Information from the Parallax website :

http://www.parallax.com/tabid/413/Default.aspx

Probably the best place to start.

The Boe-Bot from Parallax is controlled by a BS2. It was supported by MRDS until V1.5, but no more for the actual V2.0. You can find some examples and services for the Boe-Bot using MRDS 2.0 at http://www.promrds.com . The Book 'Professional Micrososoft Robotics Studio' is also worth reading.
Microsoft Robotics Studio uses C++ to program CPU's. If it can not be programmed with C++ then you would need new firmware or make your own in Assembly language for C++ support. You would just need a C++ boot loader.

The parallax Boe-Bot is controlled via Bluetooth, so for the PC side, only a Bluetooth dongle is required.

My current setup requires a BS2 to be connected to the PC so as to send signals to the RF transmitter.

I'm trying to use the Wiimote as a control interface for the robot, thus I'm thinking of using MSRS.

I dun tink BS2px can be programmed with C++.

 

Is there any other programming interface I can use?

Perhaps if you fully describe your setup, an answer can be developed. Why is there a BS2 connected to a PC, when you stated only a dongle is needed for Bluetooth control? What RF unit are you using? The Wiimote is also Bluetooth, correct? Which has a few PC hacks that can read it, so that information could be sent to the BOEbot.

To make some things clear about Microsoft Robotics Studio (MRDS).

  • You can't program your robot with Visual C# or C++  directly, you need a windows PC. MRDS needs the .NET framework, or the .NET compact framework. The .NET micro framework is not supported.
  • You have to write a monitor program for your robot in the programming language for your robot, e.g. Parallax Basic for the BS2. This monitor program acts as a remote control, executing the commands it receives from the PC, like reading the sensors, driving the motors ...
  • The whole behavior programming is done on a Windows PC, running MRDS on it. You can write programs in C# oder VPL a visual programming language. VC++ and VB maybe also possible, but preferred language is C#.  
  • You will need a serial connection between the PC and your robot. It doesn't matter if this connection is a cable, an USB serial cable, a bluetooth or a serial rf modem. For the PC and the robot it will look like a serial connection.
  • So you can control your robot wireless from a PC, or you put the PC on your robot connected by cable
The Wii-mote has Bluettooth, but didn't use the Bluetooth serial protocol, instead it uses the HID protocol. So it cannot be used directly to control a robot if your robot doesn't speak the HID protocol. The Lego NXT, I think, can do this.

Here's my plan.

1) I'm using a BS2px on my tracked robot. as of now, no sensors are attached. so its main job is to receive data from the Parallax 433 MHz RF receiver and send it to the Tamiya Dc motor. The PWM signal for the DC motor is good to go

2) another BS2px is attached to the PC side to send out the signals, i.e., to turn left/right, forward/reverse. This is because the 433 RF transmitter needs to be hooked up to a basic stamp. I'm thinking of using the debug terminal to input the movement commands to control the robot.

 

The bluetooth stuff are only for the Boe-Bot, which I'm not using for my current setup. Anyway, I do not have the appmod header to plug in the Parallax Bluetooth receiver even if i want to.

 

The debug terminal for PBasic can be used to change the parameters. however,  i find it very troublesome as i would have to press 'Enter" everytime to register a reading.

 I'm thinking of using the Wiimote as an input device to change the parameters to be sent to the motors. so the prob will be how to send the data receiver from the wiimote to the debug terminal, which will send the data out via RF.

 

regarding the  monitor program mentioned by RobotFreak, it is done via PBasic on the robot MPU right? I'm having trouble on the PC side, mainly, how to send the data from the Wii input to the debug terminal or something like that.

 

I'm also tinking of using Flash, by embedding the debug terminal onto Flash and use the wiimote as a mouse input. (reading up on this area now)

  

 

The use of the Bluetooth devices is not limited to the BOEbot.. The connections could be wired to any Stamp, as it states in the eb500-SER manual page 9,10; the main connections is from pin 3 of the eb500-SER typically to pin0 of a BS2 with pin 4 of the eb500 to pin0 of the BS2, and a common ground. If using this device and setup, there would be full transmit and receive capabilites for the robot. No appmod header required, only wire connections.

The setup described appears to have only transmit capabilites, and it might be possible to connect the transmitter to an RS232 converter to attach directly to the serial output of the PC. Adding the BS2px to the transmitter seems an added complictation though it may be needed for the "sync" pulse described in the transmitter manual.

After getting the transmitter working directly from the PC serial port adapter, it might be possible to use the example in the MSRS-Bluetooth-BOEbot description (starting page 9) to get MSRS to send commands to your robot rather than from the BS editor window. They reference a BOEBotControlforMsrs.bs2 program running on the BOEBot, with certain setup and C# program loaded on the PC in MSRS. This might work for transmit only, but other uses may require the tranmit and receive back of info from the robot.

The Wiimote can communicate with the PC with some added software.There is also Glovepie to connect with as well. These could also send data to an MSRS program, that then sends to the robot over whatever wireless being used. 

So, you have the monitor program for your MCU, ok.

For sending the Wiimote Data to your robot, you don't need Microsoft Robotics Studio, it will make you more problems, when You don't have a robot already supported by MRDS. Brian Peek has written a well documented Library for the Wiimote, You find it at http://www.codeplex.com/WiimoteLib . You don't need the sourcecode of the lib, just include the wiimotelib.dll in your project. How to use the Lib is explained here: http://blogs.msdn.com/coding4fun/archive/2007/03/14/1879033.aspx

For sending/receiving data over a serial link take a look at http://csharp.simpleserial.com/ Sending data is much easier than receiving, because You don't need an extra thread.

Here is an example for using the Wiimote with MRDS and a Lego Nxt. But I don't think this would be very helpful for you, if you don't have a Lego Nxt: http://channel8.msdn.com/Posts/Microsoft-Robotics-Studio-and-Wii-now-with-the-code/