It's done: my first NXT program with the Robotics Studio

I'm pleased to introduce my first application for the NXT created with Microsoft's Robotic Studio: a GUI-based remote control, running on the PC (XP only) and commmunicating via Bluetooth with the brick (or nearer the mark: with the LEGO NXT motor services running there).

It's very simple still, containing buttons only for running each motor separately (at need concurrently) forward or backward and for stopping them, but with the fact in mind that I'm a newbie to C#, the Visual Studio and to the Robotics Studio, I'm happy that it works at all now (after all the rummaging of the tutorials, the samples' code and a bunch of manifest files - the NXT parts are still pretty scantily documented).

Once I have spiced up the app and found out how to package Robotics Studio services for delivery, I'll put the whole stuff on my web page.

At interest, though, I could post some illustrating code snippets here already.

Matthias Paul


Alright, Matthias... you've convinced me. I'm going to download everything I need (could you comment with a list for those of us non-programmers just so we don't miss something, please?) and try this new system out.

Thanks for posting your results...

Anonymous said…
Great work, Matthias. There will be more coming in our next technical preview in support of the NXT to give you even more capabilities. Also be certain to try out the NXT in the sim. You can write code for that too. Leave a post in the Microsoft Robotics Studio newsgroup if you haven't already so others can see your progress. This is all about people sharing and building each other's successes. Best!
Unknown said…
> could you comment with a list for those of us non-programmers?

Hm..let's me recall what I did...
You need to download and install
1. The Robotics Studio
2. The Visual Studio 2005 for C#. If you don't own a commercial copy, a free lightweight edition (registration at the latest after 30 days) is available here.
3. Make sure that you have Windows XP SP 2 running.

I'd propose to start with the ready-made tutorial projects in samples/RoboticsTutorial then, in particular Tutorial4.

Be warned, though: I consider it not easy for non-programmers to do some real own stuff here with the technical preview: as already said, the NXT part is documented not too exorbitantly, and the service concept might require a somewhat steep learning curve for people used to more "traditional" object-oriented or functional approaches.

Keep an eye on the Robotics Newsgroup.

That's all that comes to my mind for now.
But I'm a learner with the Robotics Studio also, still just at the beginning. I guess we all will have to walk this path together.

Unknown said…

>There will be more coming in our next technical preview in support of the NXT to give you even more capabilities.

I'm really looking forward to this.
I have to admit that I have become a little fond of the Robotics Studio already ;-)

> Leave a post in the Microsoft Robotics Studio newsgroup.

I've did by now. Took some time, for I had to realize that the newgroups page seems to work correctly with Internet Explorer only (which is a little prejudicial to me, being most of the time on Linux...).
The posting contains two questions also - I'm curious for the answers.

Anonymous said…
Hi there,

I am a .Net developer and would like to know if I can use c# to program the NXT system.

There was an atricle on Microsoft's developer network recently that showed how it can be done using RIS 2.0.

I want to purchase a mindstorm product, but I need to be sure I can use .Net code to control it as well. The Article made it seem that it is definitely possible using RIS 2.0, but I cannot find any info on NXT

Any help would be appreciated.
Anonymous said…
>>I never had any idea this blog would become such a fun (and apparently, popular) project to maintain... Brian, Matthias, and the others have brought their own ideas and the blog has really become a partnership.<<

Yes, I totally agree. A great blog! One of the best in the last few years that I've had the pleasure of participating in. This blog stands as a shining example of how science and engineering, in its finest hour, is the collective journey of many great people - the best, as a matter of fact. It sets an example of an alternative world based on cooperation and mutual exploration, rather than a world based on the politically correct (and morally reprehensible) principle of fear and competition. Hats off!
Unknown said…
Hello, Do you know if it's posible to install MSRS on Windows XP Home SP2? I readon MSRS website that it need XP Pro SP2 and I've a lot of problems in order to run with XP Home.
Thank you
Unknown said…

> Do you know if it's posible to install MSRS on Windows XP Home SP2?

As a matter of fact, I've installed it successfully on another machine that runs Windows XP Home SP2 (instead of Pro). Yet, I haven't run any of the tutorials on it so far.
We had some info by the MS guys that it should do the job on XP Home also, though they haven't tested it extensively there.
They suggest to post any issues with Robotics Studio on XP Home to the Robotics Studio Newsgroup.
Unknown said…
> would like to know if I can use c# to program the NXT system.

Yes, you can.
The Robotics Studio is meant to be used in connection with Visual Studio 2005 for C# and there are C# based tutorials also for the NXT - the remote control program introduced in this blog post is written in C#, for instance.
Papa said…
I'm turning 60 this month and I'm a newbie to C#. I've decided the most fun way to learn C# is the NXT. Should be fun to be a newbie in both worlds.

But, as asked above, will Microsoft's Robotics Studio not only work with NXT, but also take advantage of it's new sensors, Bluetooth, etc.?
Anonymous said…
Can you tell me what changes to the tutorial manifest files you had to change? I specified the correct comm port in one, and now the windows form comes up and responds to events without errors, but there is no activity on the NXT
Unknown said…

> Also be certain to try out the NXT in the sim.

Well, I would have loved to - but the Robotics Studio is so picky about graphic cards that I didn't get even the simulation tutorials running neither on my desktop machine nor on my laptop . :-(
Anonymous said…
Im trying to do tutorial one for the nxt (c# version) and it is about accessing services. However, I don't understand how to set up the configuration file and specify the com port to use. Also, the hourglass on the nxt does not ever disappear even though my computer shows connectivity to the nxt.
Anonymous said…
MS Robotics Studio is a very powerful toolkit but if all you want to do is simply control your NXT Brick, it's way too complicated.

That's why I created a library that allows controlling your motors and sensors directly from your C# or VB.Net application. It can be found at
Anonymous said…
Sorry, is it possible to download the source code of this GUI-based remote control? Thank you...

Popular Posts