MSRS interface for the VEX controller

After much nashing of teeth, I’ve finally completed an interface for the VEX controller. The source code is located at http://www.codeplex.com/VexMsrs. For those using the IFI controller, it should be easy enough to modify the sources to support it.

No, this code is NOT FIRST competion compatible. (I’m not using the robot for competition, but for education outreach.)

You (obviously) need a PC.

You need to get something that will use the second serial port on the controller. (I used the BlueSMIrF from Spark Fun Electronics http://www.sparkfun.com/commerce/product_info.php?products_id=582) You can modify the code to use the first serial port if you want, just make sure to disable all of the printf diagnostics.

You need a programmer cable. (I’ve got the hex file included in the zip file if you don’t want to compile the file itself.)

Hopefully, some of the readers here are working with the robots outside of competition after the season is over. Good luck to all.

Enjoy

Ed

PS - What do you do after the seaon is over?

Work on robots, mostly…

Thanks for the cool stuff. Once I get up my courage, I’ll actually try it. I am afraid of bricking the controller - *these things happen to me *- so it’ll take a while.

Don

Make a MSRS interface for an FRC robot! You just got it done before me! :mad:

I don’t have an FRC controller, so I don’t feel comfortable writting it and releasing without being able to test it. The sources are there for whoever wants to extend it. (I’ll be happy to suggest where to look for changes needed.)

Ed

I am glad to see your initiative and work toward support using Microsoft Robotics Studio. I don’t have any of the supported robotics devices already supported with MSRS so I’m hoping to see what can be done with my VEX.

I’m having some trouble getting some of the code to work and have posted to the discussions at Microsoft Corporation.

Replies posted.

I usually try to check in the evening after work.

Speaking of MSRS, I need a little help here seeing what’s the diffrence between the VS to the RS.

Your question may be a casualty of overactive text messaging on cell phones but I’m having trouble understanding what you’re asking.

Are you asking what’s the difference between Visual Studio and Robotics Studio?

Visual Studio is an environment for programming languages like Visual Basic, C++, and C#. There is a free version of Microsoft’s Visual Studio products at: http://msdn.microsoft.com/vstudio/express/

Microsoft Robotics Studio (MSRS) is something quite different. It does provide a rich environment for experimenting with robotics. That product’s developer center is located at: http://msdn2.microsoft.com/en-us/robotics/default.aspx You can also download Robotics Studio free of charge from their web site.

MSRS is dependent on support from programming languages like those provided by Visual Studio.

If you can get a copy of the Spring 2007 issue of Robot Magazine http://www.botmag.com/ they have an article about MSRS using the Parallax Boe-Bot robot.

For those with the Lego Mindstorm Robots, MSRS already provides support for these devices. I don’t have either the Mindstorms or the BOE-Bot otherwise I would be starting MSRS experiments with them.

Well, I was speaking more of the diffrences with the programming area in each studio, but I just looked into the MSRS Visual Programming and it seems that the programming part of it has lots of resemblence to EasyC programming (which frankly, I prefer the raw code type). What interests me if this Visual Programming is really like EasyC and is meant to create some program for robots? and if there’s some way to change the code into raw code?

If you look closely at the MSRS docs you’ll find that it is very apparent that MS intends for C# to be the language of choice for MSRS. Not that other languages can not be used but, there are many aspects of C# that compile better with the communications model. So if you don’t like VPL, C# would be the preferred choice. I believe Visual Studio Express C# is available still for a free download. On 1 of the blogs a MS employee goes into detail why they prefer users not to use C++ for development.
I’ve Looked at MSRS and I’m beginning to see some of the advantages to the model they’ve cHoosen. I believe now that MSRS could fit in with Vex and the First FRC with some hardware mods.

I agree that C# is the language of choice for services. (Look at the samples.) I think that VPL will be the ‘language of choice’ for higher level code.

C# provides the ‘fast code’ of the service and therefore makes sense to use at the service level. (Is C/C++ better? Yes, but the margin is not big enough any more to fuss about.) The downside of this is that for the higher level, you get lost in the details.

VPL provides the string-together ability that simplifies development (just like EasyC). You don’t have to think about posting to ports. You don’t have to think about what the interface is. … It lets you concentrate on the higher level. That’s also its downfall. You cannot describe trivial operations without having a service to do the work. (Why is there a math service? So that VPL can do math???)

I’ve been trying to build a Mars Rover in C# and it has been a pain. I’m about to scrap it and try again in VPL. It makes sense. (Now if I only had time to get back to it.) I’ve been getting lost in the details at this high level. I need to backup and try again with the right language. I’ve delayed using VPL since the 1.0 version for my machine crashed a lot. It was too frustrating. Maybe the 1.5 version is more stable.

There are a ton of details to get lost in at the high level. Using the environment properly requires that you know when to break tasks into smaller tasks so that the work can be split by CCR to the appropriate threads. (Big tasks = bad idea) Am I an expert? No, but I’ve glimpsed the power of the environment. Am I a Microsoft advocate? No, I just like a paycheck. I’ve tilted at too many windmills.

I REALLY hope that IFI will have a Bluetooth/Zigbee/whatever released addition to make this easier. (I personally would prefer a Zigbee device. Lots of range. :>)

Ed

Many of you seem to be forgetting, or not even know, that VB.net, J#(Java in .net), C#, A#(Ada in .net), and others, all are capable of running MSRS services. C# just happens to be used more commonly in the samples.

I know some people call the non-C-like languages(VB) “baby” languages, but they all have the same abilities, have no(or very very very little) performance difference, and some(VB) are simpler to read/understand than C syntaxes. I would not be surprised if many, or even most, people would choose VB.net as their programming language, just because it is so much easier to read for new programmers.

For those of you who don’t think the other .net languages are equal to VB, just show me one thing C# can do that VB can’t.

EDIT:The downloads for C#, VB, and J#, along with SQL Server express, are available here.