Slashdot Mirror


.Net On Lego Mindstorm

troop23 writes "A blog posting by Benjamin J. J. Voigt says this "The University of Potsdam has a project to develop a .NET VM for the Lego Mindstorms system. Lego Mindstorms just got a higher priority on my shopping list!" While the thought of using .Net to program Lego Mindstorms may not be palatable, having a mainstream dev environment sure is." Perhaps Mono would work just as well.

31 of 132 comments (clear)

  1. Is Lego back on firm financial ground? by Phoenixhunter · · Score: 4, Interesting

    Last I heard they had to axe some of their newer lines of products...they doing okay? I'd hate for my children to grow up in a world without Lego one day...

    1. Re:Is Lego back on firm financial ground? by Planesdragon · · Score: 4, Interesting

      Lego, like D&D or Disney, is a secure enough brand that even if its current owner went belly-up the brand itself would be bought, lock stock and barrel, and someone else would put out Legos.

      The only thing that could kill Lego would be someone competing with Lego and doing Lego better--in which case your kids would have leogos, just with a different name.

    2. Re:Is Lego back on firm financial ground? by Coward,+Anonymous · · Score: 4, Informative

      They expect to break even this year.

    3. Re:Is Lego back on firm financial ground? by dune73 · · Score: 3, Interesting

      After the financial flop of mindstorms and other stuff, that techies love and grandparents do not understand, they pulled the lever and are heading in a different direction now.

      The cash flow dropped by 25% in 2003 alone. So they want to cuts 500 jobs by 2006.

      You can read more at
      http://www.wdr.de/themen/kultur/stichtag/2004/ 05/0 1.jhtml
      (German only).

    4. Re:Is Lego back on firm financial ground? by meringuoid · · Score: 3, Informative
      There's a Lego store recently opened in Birmingham which has some truly amazing stuff. Yes, there's a lot of that awful Bionicle stuff and suchlike with special pieces and so on, but there's SO MUCH COOL STUFF!

      I only just got out of there yesterday without buying a giant orange robot looking just like EVA-00, with instructions for four or five alternates. They've got a pick-and-mix section at the back where you can take a big tub - like the ones you get drinks in at the cinema - and fill it with your choice of pieces. Classic models - like the pirate ships your parents would never buy but you can now afford yourself! muhahaha!

      Um, sorry, got a bit carried away... but I think Lego are getting the idea lately, and realise what their market really is.

      --
      Real Daleks don't climb stairs - they level the building.
    5. Re:Is Lego back on firm financial ground? by mark-t · · Score: 5, Informative
      They are not pulling the plug on Mindstorms.

      See here (January 2004) and here (March 2004)

      There was quite a kafuffle shortly after Christmas of last year when LEGO announced their shift in direction. Quite a large number of people were very concerned that LEGO would be dropping Mindstorms. Flurries of posts on LEGO discussion lists and even letters directly to LEGO were filled with remarks much to the effect of "What?!?!? Why is LEGO doing this?" LEGO issued the January press release above to abate those concerns. Also mentioned above is a March release in which they restate the Mindstorms is one of their core products and they will *NOT* be dropping it.

      First Lego League is also very dependant on Mindstorms, and I don't think they're going away anytime soon.

  2. Why? by cbrocious · · Score: 5, Interesting

    I don't get it. Why would they go with .NET rather than just writing a C/C++ compiler for it? We're talking about a low-speed embedded device here, a situation where the use of a VM is less than ideal. Is it just because they want to make the front page of slashdot, or is there a real reason?

    --
    Disconnect and self-destruct, one bullet at a time.
    1. Re:Why? by Anonymous Coward · · Score: 4, Informative
      The .NET VM, which was originally OmniVM from Colusa (who microsoft bought in '96); is a really nice design - more flexible (able to run more languages easily) than the Java VM.

      C/C++ (which the parent article asked about - is really just a language (like C#) and not a runtime). The biggest distinction is that the runtime will address issues like loading code dynamically. Had they simply ported C/C++ there would have been a whole lot more architecture-specific battles to fight (a.out vs elf, etc).

    2. Re:Why? by gabebear · · Score: 3, Informative

      There is a replacement firmware that lets you use C++ compiled binaries BrickOS. works well, I'm about to re-release a web interface for BrickOS. The old LegOS compiler is Here.

    3. Re:Why? by iamdrscience · · Score: 4, Insightful

      Well there already are C/C++ compilers for Lego mindstorms, so writing a new one wouldn't add that much. Writing a .net VM however fulfills a new purpose. Whether it's really necessary or ideal is another argument, but it definitely provides more new functionality than writing another C compiler would.

      Anyways, while you're right a VM is less than ideal for embedded systems, there are embedded Java VMs that people use and to a lesser extent there are people that use python and perl in embedded systems. Sometime it just makes sense to choose a solution that requires more computing power because it allows you to program faster. In fact, I think if there's any case of an embedded system where a VM isn't a big deal it would be one that's just for fun, not production, that is, the exact market of lego mindstorms. I mean, it's really a lot like Basic stamp microcontrollers. It doesn't make sense to build a product around them, but if you're just messing around with stuff there are plenty of people who don't mind paying more so that they can write their code quicker.

    4. Re:Why? by Anonymous Coward · · Score: 4, Insightful

      Too bad Sun can't produce cross-platform compatibility even within their own product line. For example, mobile devices use J2ME while PCs use the J2SE framework.

      You will find a lot of the J2ME and J2SE are not binary compatible and barely source compatible if you try to port the simplest app. The "Write once, run anywhere" argument doesn't really stand up here IMHO.

    5. Re:Why? by jrumney · · Score: 4, Insightful
      Windows Mobile uses .NET compact framework while XP uses the normal framework....You'd be better off you use a C++ compiler, or use a proper runtime Java where "write once, run anywhere" actually means something.

      Do you think those Java capable mobile phones have the full blown Java API on them, and run standard non-preverified class files?

    6. Re: why? by ron_ivi · · Score: 5, Interesting
      Or even better, use a more powerful microcontroller for your legos like a GameBoy. Programmable in C or C++, has Sound and a color LCD display, and with a 32-bit RISC CPU, you can do far more with this than the current Mindstorm microcontroller.

      Bluetooth modules are apparently also available for this device. Engadget has a description and a link to a cool video of this Gameboy/Lego interface in action

    7. Re:Why? by xenocide2 · · Score: 5, Informative

      Funny story about Java. Originally it was designed as a language for embedded systems, back when it was called Oak. There, the idea of a VM to provide various system tasks is actually quite tenable. The idea being, they write the VM once for a platform, and you're free to start prototyping the code before you finalize your choice of board.

      Reality sunk in, and the embedded systems market just didn't like the idea. Training people in the new language was going to be expensive (compared to the status quo), and most were skeptical about the utility of a VM. The concern being that you typically need or want access to specific available resources that an abstract interface can't provide.

      Seems marketing shifted gears and started pushing applets and the web. Went okay for them in the end, I guess.

      --
      I Browse at +4 Flamebait

      Open Source Sysadmin

  3. Java VM by Anonymous Coward · · Score: 5, Informative

    A Java VM exists already. It's called leJOS.

  4. FIRST Lego League by His+Eminence · · Score: 3, Informative

    http://www.usfirst.org The FIRST lego league might have use for this, but I doubt middle-schoolers would be interested...

  5. If you want C/C++ the best thing to use is by Anonymous Coward · · Score: 4, Informative

    BrickOS. It's faster and has many more features than NQC (a competing language) which uses the proprietary Lego firmware for the RCX.
    BrickOS has its own firmware and supports threading and all the basic C/C++ functionality.

    See:

    http://brickos.sourceforge.net/

  6. Mindstorms Robot by andrewdk · · Score: 4, Interesting

    Bah. My LEGO Mindstorms robot + Vision Command camera beats everything when I use Perl and PHP to allow people to drive it around my room from across the world. A link to this robot's interface would mean doom to my connection so I'm keeping it under covers ;)

  7. NQC? by MrFlannel · · Score: 5, Informative

    There already is a C compiler (well, its very close to real C) its called NQC (Not Quite C). You can buy a book about it. Google yields this as its site. http://bricxcc.sourceforge.net/nqc/

    --
    Clones are people two.
  8. Cool but beware... by xelph · · Score: 4, Funny

    of that blue brick fo death!

  9. Re:Still trying to catch up by omicronish · · Score: 3, Insightful

    Still trying to catch up ... to Java, huh? This stuff has been around for Java for years now.

    Which wouldn't be surprising since Java was released in 1996, while .NET was released in 2002. You could've said the same thing when Java was first implemented on an embedded device. C/C++ and assembly were likely there for years before.

  10. Yes. by Anonymous Coward · · Score: 4, Funny

    Evil robots with minds built by the Microsoft corporation all over the world.

    I, for one, welcome our new Microsoft powered robotic overlords.

  11. Developing for the Mindstorms brick by mollymoo · · Score: 5, Informative
    I've been playing with Mindstorms for a few years. There are basically two approaches used for programming the brick: Using the Lego firmware and replacing it. The graphical Lego programming language provided with the kit compiles to bytecodes which run on the Lego firmware. It's not very fast or flexible. The brick is a Hitachi H8 at heart, so writing code for it is preferable if you know how.

    NQC (Not Quite C) is compiled to Lego bytecodes. BrickOS programs are compiled to H8 with gcc. There are also Forth and Java environments.

    Given the range of options available (for *nixen, Windows, Mac...) I'd have to say in this case "mainstream" must mean "Microsoft".

    --
    Chernobyl 'not a wildlife haven' - BBC News
  12. Why not "palatable" to have a .NET environment? by ellisDtrails · · Score: 3, Insightful

    Please elaborate why it would be a negative to provide the very robust .NET Framekwork to Lego Mindstorms.
    I love how the editorial commentary on posts here is full of straw-men and assertions. Prav-dot anyone?

  13. What's the problem? by Proc6 · · Score: 3, Insightful
    "While the thought of using .Net to program Lego Mindstorms may not be palatable..."

    Man what's with the bias against .NET. Oh it's not "worthy" of controlling Lego Mindstorms?

    OH NOS! OMGZ, I R NOT HAX0RING MY LEGOS NLESS ITZ IN ASS3MBL3R. .NET BAD K PLZ THX! D0WN WIT MICRO$OFT!!!!111!1!

    Seems to me .NET is a good idea, so good in fact it's ripped off by Mono. A solid intelligable foundation library of objects, inter language, cross platform compatability. C# is a very enjoyable language to work in for some of us (personal preference). There's always the /.'ers with monkeys on their backs that insist its one huge elaborate Microsoft bait and switch to lock everyone into the Microsoft Evil Empire, but it seems to me theres a ton of positives as well, ECMA standardization, dozens of .NET capable languages now, and the MONO project is a great thing (that is a direct result, like it or not, of .NET being born). So whats with all this "oh nos, its Microsoft, so I shall not dirty my hands of complimenting it! Must bash in every post ever!".

    Open your minds like you open your source and you might learn something, like some tools are good for some jobs, other tools for other jobs. Not everything that comes from MS is evil and not everything that comes from OSS is good.

    Flame away.

    --

    I'm Rick James with mod points biatch!

  14. Re:IDL Libraries? by omicronish · · Score: 5, Informative

    Great now you'll have to include 60 MB of IDL code to run any program. Where do these ideas come from? Who would think to port a bloated server app development API to a portable device. .NET is loved by managers who think they can dumb down their server side code so any H1-B can do it, that's about it. Nobody even uses .NET for desktop apps, so where'd the idiotic idea that it would take off in a portable environment come from. The main reason I refuse to use .NET for desktop apps is the 60 MB IDL needs to be included, better to VB 6 or anything else for that matter. M

    I would imagine most of that 60 MB is the .NET framework library, only a fraction of which you'd really need to port to portable devices. Stuff like ASP.NET, Winforms, the entire System.Drawing namespace probably wouldn't be needed. At the very core you'd only need an execution engine, which is basically an IL interpretor, and perhaps a partial implementation of the System namespace. Yes, there's bloat, but certainly nothing like 60 MB, and for something non-critical like Lego Mindstorms, the bloat would be acceptable to me.

  15. Oh FFS... by kahei · · Score: 3, Insightful


    Perhaps Mono would work just as well.

    'Mono' and '.NET' are not two competing products. .NET is a standard.

    Mono is an implementation of it, together with some development tools and non-standard libs and bits and pieces.

    The MS .NET runtime (bit of a misnomer really) is also an implementation of it, together with some development tools and non-standard libs and bits and pieces.

    You cannot 'use Mono instead of .NET'. What you COULD do is port Mono to Mindstorms rather than developing a .NET VM from scratch.

    This has been a public service announcement from the department of Things That The Average Slashdotter Cannot 'Get' No Matter How Often They Are Mentioned (TTTASC'G'NMHOTAM). In next week's exciting episode, we explain the difference between copyright violation and theft, and three posters reply by saying 'you can dress it up in fancy talk all you want but it's still theft!'

    --
    Whence? Hence. Whither? Thither.
  16. The lego design flaw. by Kevin143 · · Score: 3, Insightful

    I did a lot of lego design for a robotics competition I competed in last year. While legos are great because they are so easy to use, I can't stand using them for anything even slightly large in scale because of what I have dubbed "The Lego Design Flaw." Basically, there is a 6:5 ratio of height to width on legos which makes construction and reinforcement much, much more difficult than it needs to be when working in the full 3 dimensions that the Lego Technic allows one to work in.

  17. Use Ruby by Anonymous Coward · · Score: 3, Informative

    There's a Ruby interface for Lego Mindstorms here:

    http://rubyforge.org/projects/lego-mindstorms/

  18. More power to mindstorm. by Gentlewhisper · · Score: 3, Interesting

    While mindstorm is cool, but i'm kind of disappointed to see how underpowered the motors are. If only they'd have some kind of "adult" mindstorm sets where you can build you own remote controlled helicopter out of legos.. wow, that'd be so darned cool.

    Of course I doubt usual lego blocks would do though, too heavy to fly, but there's the idea. I'm sure many parents still have a secret longing for the toys they played in their childhood.

    Guys never grow out of their toys! =)

  19. lego helper by yuppienetworking · · Score: 4, Funny

    LEGO + .NET = lego-helper.
    You will start building something when out of nowhere some lego pieces shaped like a paper clip start talking and say: "It looks like you are building a car..."