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.

20 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 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 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.

    3. 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.

    4. 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?

    5. 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

    6. 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. 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/

  5. 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 ;)

  6. 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.
  7. Cool but beware... by xelph · · Score: 4, Funny

    of that blue brick fo death!

  8. 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.

  9. 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
  10. 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.

  11. 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..."