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.

17 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 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).

    3. Re:Is Lego back on firm financial ground? by Laur · · Score: 2, Interesting
      I should get some bricks and build a huge permanent clock.

      It's been done.

      --
      When you lose something irreplaceable, you don't mourn for the thing you lost, you mourn for yourself. - Harpo Marx
  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 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

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

  4. Re:Put down the Crack.Net pipe by Anonymous Coward · · Score: 2, Interesting
    Java VMs anf Forth are very similar. I've had a job writing Java Bytecode by hand (for a javachip, building the higher-level bytecodes (like invoking methods) over the lower-level ones.

    Both have a very similar stack, and both do all their operations on the stack in the same way.

    Some of the first java chips were modified Forth chips (from patriot scientific). Others (the one from icompression) were very simple stack-based designs as well.

    What advantage do you think Forth has over a VM? Both do well on stack-based architectures.

    C works well on non-stack-based architectures with lots of registers (mips, arm, sparc, etc).

    Both work about equally well (or you could sya, neither work well) on register-starved x86 based architectures.

    Assembler is a different concept altogether. Note that when I was writing the high-level java bytecodes for a chip which ran Java bytecodes natively, I was using assembler _and_ a java VM at the same time.

  5. Re:FIRST Lego League by Anonymous Coward · · Score: 1, Interesting
    I used to be on a team last year. Now (I guess) I'm helping run the state tournament's website. The FLL link you are looking for is http://www.firstlegoleague.org/default.aspx.

    Unfortunately, this probably won't change anything. I did want to program in higher-level (or lower, whichever way you look at it) languages, but they didn't allow "external" programming languages.
    6. ALLOWABLE SOFTWARE The Robot must be programmed using LEGO MINDSTORMS Robotics Invention System or RoboLab software (any version).
    (from http://www.firstlegoleague.org/default.aspx?pid=11 250) Yes, this is for the 2003 challenge, but from what little I can say without giving away too much, the rules still forbid it.

    That doesn't mean that people won't use it though :), it just has to look real. Too bad.
    -Anonymous Coward
  6. Re:Mindstorms Robot - with GameBoy microcontroler by Anonymous Coward · · Score: 1, Interesting
    I think this interface card for Charmed Labs that turns a GameBoy into a controller for Legos is the coolest.

    It's programmed 100% in C, is Bluetootha? enabled, etc.

  7. Re:What's the problem? by LnxAddct · · Score: 2, Interesting

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

    You ever use Java? Many more libraries and they are more feature filled and flexible, also its faster. C# is not technically cross platform, it only is because the OSS world is making it so. That'd be like saying a Win32 executable is cross platform compatible because of Wine.
    Regards,
    Steve

  8. Re:IDL Libraries? by owlstead · · Score: 2, Interesting

    You are right about that. Consider Java where a similar thing is happening with J2ME. True, the complete API is much larger, but the main bytecode compiler is much smaller. For Javacard, there is a stripped down java.lang package, and a few specialized crypto and communcation libraries. We're talking KB's here. Garbage collection, class loading , everything is stripped except the byte code and the Java language itself.

    The main benefits? Class support, byte[] support without the possibility of buffer overflows, exception support etc. etc. All you need to get things working, nothing you don't need. VM's are are just great for such things. The only big problem with it is if you need really tight timing. You need to go to C or assembly level code for that. So you need to encapsulate some heavy IO ops.

  9. This has been done before with Inferno/Limbo by CondeZer0 · · Score: 2, Interesting
    For people with good taste and that program in the language that was meant to be the true C successor: Limbo, we have had Styx-on-a-brick for a long time, and you can get the source for it too: http://www.vitanuova.com/inferno/co/rcx/

    Styx-on-a-brick is really cool and fits directly into the Unix way of doing things:
    % mount -A /net/legolink /n/remote

    % cd /n/remote
    % ls
    motor sensor

    % ls motor
    motor/0 motor/1 motor/2 motor/012

    % ls sensor
    sensor/0 sensor/1 sensor/2

    # Start motor...
    % cd motor
    % echo -n f7 > 0

    # Reverse the motor...
    % echo -n r7 > 0

    # Stop the motor...
    % echo -n F0 > 0

    # Run the motor for 5 seconds...
    % echo -n r7 > 0; sleep 5; echo -n F0 > 0

    # Ok, lets play with a sensor...
    % cd /n/remote/sensor
    % echo b0 > 0
    % cat 0
    0

    # Click the button a few times and then try reading the sensor file again
    % cat 0
    4

    # Let's try a blocking read on the sensor
    % echo b5 > 0
    % cat 0
    # [click the button 5 times]
    5

    # Ok, we're done playing - unmount the brick namespace
    % ls /n/remote
    /n/remote/motor /n/remote/sensor
    % unmount /n/remote
    % ls /n/remote
    %
    And then you can easily connect it an Inferno Grid: http://www.vitanuova.com/solutions/grid/demogrid.h tml

    Why use a bad Java clone(that is what .NOT is after all) when you can use an elegant and KISS language like Limbo? Not to mention that Inferno brings the ideas of Unix into the distributed environment world in the most beautiful way... Paraphrasing God Henry Spencer: Those who don't understand the work done at Bell Labs are doomed to reinvent it, poorly.

    uriel

    P.S.: And yes, for those still living under a rock, Both Inferno and Plan 9 are Open Source. Inferno: http://www.vitanuova.com/inferno/net_download4T.ht ml Plan 9: http://plan9.bell-labs.com/plan9dist/

    P.P.S.: For those that don't know what Inferno is and to bypass SlashDot filters here is some text from Dennis M. Ritchie himself: Limbo is a programming language intended for applications running distributed systems on small computers. It supports modular programming, strong type checking at compile- and run-time, interprocess communication over typed channels, automatic garbage collection, and simple abstract data types.

    And here is an extract from an interview with Ken God Thompson, creator of Unix and co-inventor of C:
    Computer: How does your work on Plan 9 and Inferno derive from your earlier work on Unix? What are some of the new ideas arising out of this work that could and should apply to distributed operating systems in general?
    Thompson: [...] In Plan 9 and Inferno, the key ideas are the protocol for communicating between components and the simplification and extension of particular concepts. In Plan 9, the key abstraction is the file system any thing you can read and write and select by names in a hierarchy and the protocol exports that abstraction to remote channels to enable distribution. Inferno works similarly, but it has a layer of language interaction above it through the Limbo language interface which is [somewhat] like Java, but cleaner.
    --
    "When in doubt, use brute force." Ken Thompson
  10. Re:What's the problem? (TROLL) by aphor · · Score: 2, Interesting

    Maybe you're not talking about the same thing that .NET detractors dislike. It might not be the .NET itself, but rather the unwillingness to throw any additional support towards the already-unmanageable 800 pound gorilla. Maybe it isn't the OSS software people really like, but rather the freedom that they have to deal with what they don't like.

    Lesson for Slashdot readers in filtering the subtle troll:

    Either you really don't understand the people you're talking about, or you're just an astroturfer. Discrediting your post only requires a little good discussion. The suggestion "flame away" that you are inviting people to flame you in response doesn't mean that every response is a flame. Just because you get flames does not mean your opinion holds water. It only means you have failed to reach an audience capable of responding with meaningful criticism. Inviting flames is tantamount to a request for people to pollute any discussion or criticism that may follow. You post your crap in bad faith that it can stand up to open discussion. You are a troll.

    --
    --- Nothing clever here: move along now...
  11. Double-plus good Chariman Bill by turgid · · Score: 2, Interesting
    Can't Microsoft apologists think of anything new? This was done with Java years ago!

    Double-plus good Bill.

  12. Re:Put down the Crack.Net pipe by HeghmoH · · Score: 2, Interesting

    A Java environment for the Mindstorms has existed for quite some time. Appropriate or not, some people seem to find it useful.

    --
    Mod down posts with a "Free Mac Mini/iPod" sig, they're spam!
  13. 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! =)