Ruby & Mindstorms NXT 21955

Posted by Tom Sat, 14 Oct 2006 09:29:00 GMT

Using Ruby with your Mindstorms NXT is easy using RubyNXT. But it still requires a bluetooth connection or USB connection.

How cool would it be if it was possible to write a Ruby program, upload it (in sourcecode) to your NXT brick and have a Ruby interpreter firmware running on the NXT? It wouldn’t be needed to port the whole Ruby Standard Library, it wouldn’t even be needed to convert the whole Ruby Core Library.

So what would be needed to get this to work? Cross-compilation of Ruby to ARM, someone already ported Ruby to his Zaurus. A new firmare is needed.

Maybe better yet is the use of a Ruby VM like YARV and get that to run on the Mindstorms brick. Still, that needs to be cross compiled and a new firmware is needed.

Ruby is a fully object oriented programming language and is fairly easy to learn, even easier to use. More and more programmers learn Ruby.

Comments

Leave a response

  1. Matt Zukowski Wed, 01 Nov 2006 20:02:41 GMT

    Hey I’m one of the two developers working on ruby-nxt. Just wanted to drop you a line and let you know we’re actively reading stuff like this in the NXT + Ruby community.

    A mini-Ruby VM for the NXT would be awesome indeed. Another possibility is a Ruby-based bytecode generator. i.e. you write some Ruby code, and it gets compiled into an NXT binary ready for uploading.

    That said, I think the ruby-nxt approach, where all your processing is done on a computer/laptop is really the way to go. The NXT brick itself is pretty limited in terms of memory and processing power. You can do a lot more complex and interesting stuff if your let your computer act as the NXT’s brain.

    The one problem we’ve come up against is that Bluetooth direct commands are a bit slow as compared to native code. Mind you, they’re fast enough for most things, but there can be a split second delay between successive commands. This is a bit problematic when doing fine movements or rapid reactions. Tony Buser has uncovered some interesting hidden functionality in the NXT that lets us get around some of this (auto-adjusting for precision movements, for example) but it remains a challenge.

  2. Tom Wed, 22 Nov 2006 20:58:39 GMT

    Hey thanks for dropping by, I didn’t see this comment, probably due to caching and (my own) time restraints. We’ll I just thought that if LeJOS could do it with the old brick, why can’t it work with Ruby? Memory and processing-power wise it’s indeed not perfect, but one got to keep dreaming :D I’ll certainly give ruby-nxt a try.

  3. Dave Wed, 03 Jan 2007 06:10:49 GMT

    Hey,

    I’m the David Anderson that wrote LibNXT (thanks for your info on getting it working on OSX, I needed that :) ).

    I’m no ruby fan myself (no offense to the language, I just learnt python first), but I am planning on writing an open source firmware for the nxt. The Grand Plan for that firmware is to initialize all the hardware, expose a C API to use that initialized hardware, and then boot a single user application (probably payloaded with the kernel for the time being). That application can be anything, as long as it initially boots up following C calling conventions, so I don’t see why it couldn’t be a Ruby VM, assuming that Ruby can fit into

    I’m planning on a Lua VM myself. Right now, I’ve written the kernel bootstrapping code, as well as the toolchain support code (GNU ld scripts to specify the binary image format), and as soon as I can get a JTAG debugger to help me along I’m going to start work on Electric Storm, the beginnings of an open source firmware :-).

    Party on!

  4. KVlQJX Sat, 07 Jun 2008 21:25:19 GMT
  5. John Doe Mon, 09 Jun 2008 19:04:41 GMT

    c2c9b97f634cabc5ab8a40a7eb4a3fbd

  6. hello world Tue, 10 Jun 2008 13:50:59 GMT

    hello world hello world http://helloworld.com hello world world[/url]

  7. Masterboys Wed, 11 Jun 2008 17:27:55 GMT
  8. YTfRlk Mon, 16 Jun 2008 10:24:47 GMT
  9. biuxhxcp Mon, 23 Jun 2008 17:51:36 GMT

    FdemMS wotruqxfkytp, [url=http://kqdqjvaredmc.com/]kqdqjvaredmc[/url], [link=http://ecnjxbndhhei.com/]ecnjxbndhhei[/link], http://lzyoaxjkufbt.com/

  10. Hbpbeyie Tue, 24 Jun 2008 17:02:11 GMT
  11. Azcycwta Tue, 24 Jun 2008 20:47:11 GMT
  12. Maqzbtha Tue, 24 Jun 2008 23:22:43 GMT
  13. Zxjlkdbm Tue, 24 Jun 2008 23:52:38 GMT
  14. Avcoxdxd Wed, 25 Jun 2008 00:20:02 GMT
  15. Sampemisize Thu, 26 Jun 2008 01:05:30 GMT

    this bonus ;)

  16. Phylvvay Thu, 26 Jun 2008 16:41:50 GMT
  17. Lkbbysmk Thu, 26 Jun 2008 17:18:36 GMT
  18. Bqocasrq Thu, 26 Jun 2008 18:43:22 GMT
  19. Tsqodacq Thu, 26 Jun 2008 19:19:59 GMT
  20. Ylhqzfeo Fri, 27 Jun 2008 00:23:53 GMT
  21. Fhgqfrak Fri, 27 Jun 2008 01:01:45 GMT
  22. Zeauifoi Fri, 27 Jun 2008 01:39:41 GMT
  23. Ylulsbbd Fri, 27 Jun 2008 02:17:48 GMT
  24. Mnvrqyxx Fri, 27 Jun 2008 02:55:49 GMT
  25. Imkrcdeg Fri, 27 Jun 2008 16:51:16 GMT
  26. Rivwecvd Fri, 27 Jun 2008 17:29:53 GMT
  27. Kbtgvocy Fri, 27 Jun 2008 18:11:15 GMT
  28. Dfzwmwyi Fri, 27 Jun 2008 23:03:27 GMT
  29. Ditzdosr Fri, 27 Jun 2008 23:40:31 GMT
  30. Ogvqudmk Sat, 28 Jun 2008 00:18:33 GMT
  31. Koufnnya Sat, 28 Jun 2008 00:58:01 GMT
  32. Hyadnfksdgfnmm Sat, 28 Jun 2008 16:05:15 GMT

    Very good site! juyhdsflad

  33. Gmpspruq Sat, 28 Jun 2008 22:06:06 GMT
  34. Ndwbjwip Sat, 28 Jun 2008 22:46:27 GMT
  35. Bkkdkywj Sat, 28 Jun 2008 23:26:05 GMT
  36. Dgutlvdy Sun, 29 Jun 2008 00:06:02 GMT
  37. Txhyxyew Sun, 29 Jun 2008 00:46:03 GMT
  38. Hmyeusgi Sun, 29 Jun 2008 01:25:24 GMT
  39. Stzejrzx Sun, 29 Jun 2008 23:09:25 GMT
  40. Tliuypir Sun, 29 Jun 2008 23:50:57 GMT
  41. Nnrbwvcb Mon, 30 Jun 2008 00:33:52 GMT
  42. Xmkkzxog Mon, 30 Jun 2008 01:16:43 GMT
  43. Kybrvbec Mon, 30 Jun 2008 01:59:19 GMT
  44. Yvxnhtnv Mon, 30 Jun 2008 02:40:15 GMT
  45. Bsgtrnnm Mon, 30 Jun 2008 03:21:52 GMT
  46. Oievzkih Mon, 30 Jun 2008 04:03:49 GMT
  47. Hjumsdlnszcvxjlad Wed, 02 Jul 2008 00:19:41 GMT

    hjumsdlnszcvxjlad hjumsdlnszcvxjlad [url=http://buyfeldonline.wikidot.com/]hjumsdlnszcvxjlad[/url] [link=http://buyfeldonline.wikidot.com/]hjumsdlnszcvxjlad[/link] http://buyfeldonline.wikidot.com/

  48. jonn3 Wed, 02 Jul 2008 01:11:02 GMT
  49. ihrskc Thu, 03 Jul 2008 00:32:46 GMT